1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Don't go haywire if the server closes the connection during a multiline

response.
This commit is contained in:
Dag-Erling Smørgrav 2000-11-22 14:30:28 +00:00
parent 8057e004aa
commit 1baad1a183
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69041

View File

@ -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;
}
}
}