aboutsummaryrefslogtreecommitdiff
path: root/lib/libfetch/ftp.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2000-11-22 14:30:28 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2000-11-22 14:30:28 +0000
commit1baad1a18379ffba7681cf878c5760ad1d90376c (patch)
tree9100a180ae2c58afd4a626f00ac1601315dab92e /lib/libfetch/ftp.c
parent8057e004aa4c758cf9037d390a865220c7354286 (diff)
Notes
Diffstat (limited to 'lib/libfetch/ftp.c')
-rw-r--r--lib/libfetch/ftp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c
index 3e563429c145..768cc74995ce 100644
--- a/lib/libfetch/ftp.c
+++ b/lib/libfetch/ftp.c
@@ -140,9 +140,13 @@ _ftp_chkerr(int cd)
}
if (isftpinfo(last_reply)) {
while (!isftpreply(last_reply)) {
- if (_fetch_getln(cd, &last_reply, &lr_size, &lr_length) == -1) {
+ switch (_fetch_getln(cd, &last_reply, &lr_size, &lr_length)) {
+ case -1:
_fetch_syserr();
return -1;
+ case 0:
+ _ftp_seterr(FTP_PROTOCOL_ERROR);
+ return -1;
}
}
}