summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2000-10-27 11:37:21 +0000
committerdes <des@FreeBSD.org>2000-10-27 11:37:21 +0000
commitea5581599fd86937f5f773c8e66aedd6a3524383 (patch)
treee15c597e578ca3e7377ddd5c1232e3359e93d832
parent1b7ba5be364a2f76b050e9b5866f4e856d327f69 (diff)
downloadFreeBSD-src-ea5581599fd86937f5f773c8e66aedd6a3524383.zip
FreeBSD-src-ea5581599fd86937f5f773c8e66aedd6a3524383.tar.gz
MFS: don't expect result code until you close the data connection
-rw-r--r--lib/libfetch/ftp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c
index 5c28804..00b1cf5 100644
--- a/lib/libfetch/ftp.c
+++ b/lib/libfetch/ftp.c
@@ -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;
OpenPOWER on IntegriCloud