if builtin_ls failes, return error
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10859 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -312,6 +312,11 @@ main(int argc, char **argv)
|
||||
defumask = val;
|
||||
}
|
||||
}
|
||||
sp = getservbyname("ftp", "tcp");
|
||||
if(sp)
|
||||
port = sp->s_port;
|
||||
else
|
||||
port = htons(21);
|
||||
if(port_string) {
|
||||
sp = getservbyname(port_string, "tcp");
|
||||
if(sp)
|
||||
@@ -321,12 +326,6 @@ main(int argc, char **argv)
|
||||
port = htons(atoi(port_string));
|
||||
else
|
||||
warnx("bad value for -p");
|
||||
} else {
|
||||
sp = getservbyname("ftp", "tcp");
|
||||
if(sp)
|
||||
port = sp->s_port;
|
||||
else
|
||||
port = htons(21);
|
||||
}
|
||||
|
||||
if (maxtimeout < ftpd_timeout)
|
||||
@@ -2165,8 +2164,10 @@ list_file(char *file)
|
||||
if (dout == NULL)
|
||||
return;
|
||||
set_buffer_size(fileno(dout), 0);
|
||||
builtin_ls(dout, file);
|
||||
reply(226, "Transfer complete.");
|
||||
if(builtin_ls(dout, file) == 0)
|
||||
reply(226, "Transfer complete.");
|
||||
else
|
||||
reply(451, "Requested action aborted. Local error in processing.");
|
||||
fclose(dout);
|
||||
data = -1;
|
||||
pdata = -1;
|
||||
|
Reference in New Issue
Block a user