MFS: don't expect result code until you close the data connection

This commit is contained in:
Dag-Erling Smørgrav 2000-10-27 11:37:21 +00:00
parent c9e6ddc6af
commit 303fd73aa7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67707

View File

@ -389,11 +389,11 @@ _ftp_closefn(void *v)
errno = EBADF;
return -1;
}
io->err = _ftp_chkerr(io->csd);
close(io->dsd);
io->dir = -1;
if (close(io->dsd) == -1)
return -1;
io->dsd = -1;
DEBUG(fprintf(stderr, "Waiting for final status\n"));
io->err = _ftp_chkerr(io->csd);
close(io->csd);
io->csd = -1;
return io->err ? -1 : 0;