|
|
|
@ -138,10 +138,10 @@ static int __remote_ls(FILE *fso, struct _remote_host *rh, const char *opts)
|
|
|
|
|
|
|
|
|
|
/* ok determine the lenght */
|
|
|
|
|
remote_rpc_len = strlen("dir-open") + 12*sizeof(char) +
|
|
|
|
|
(opts ? strlen ("./") : strlen(opts));
|
|
|
|
|
(opts ? strlen (opts) : strlen("./"));
|
|
|
|
|
if(!(remote_rpc = malloc(remote_rpc_len))) return ENOMEM;
|
|
|
|
|
else remote_rpc_len = snprintf(remote_rpc, remote_rpc_len,
|
|
|
|
|
"(dir-open \"%s\")", opts ? "./" : opts);
|
|
|
|
|
"(dir-open \"%s\")", opts ? opts : "./");
|
|
|
|
|
|
|
|
|
|
/* firstly open the required channel with required type */
|
|
|
|
|
if(!(rpc_channel = sxchannel_open(rh->link, READONLY_CHANNEL))) {
|
|
|
|
|