aboutsummaryrefslogtreecommitdiff
path: root/lib/libftpio/ftpio.c
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1996-08-21 01:23:33 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1996-08-21 01:23:33 +0000
commit92d084569bbd6b97a72fb77c64a849c2964b038a (patch)
tree4a3ac7d02eadc9f446a0e7afc7e008cd2eb8187a /lib/libftpio/ftpio.c
parent6f828b77f3254409e02eea3e809fcd696f6621df (diff)
downloadsrc-92d084569bbd6b97a72fb77c64a849c2964b038a.tar.gz
src-92d084569bbd6b97a72fb77c64a849c2964b038a.zip
Implement a change suggested by Archie Cobbs - the seekto argument should
be zero'd only if the operation *fails*, indicating that the file starting offset is effectively zero. This makes more sense.
Notes
Notes: svn path=/head/; revision=17733
Diffstat (limited to 'lib/libftpio/ftpio.c')
-rw-r--r--lib/libftpio/ftpio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libftpio/ftpio.c b/lib/libftpio/ftpio.c
index e0555e2ff3d5..854a968207f6 100644
--- a/lib/libftpio/ftpio.c
+++ b/lib/libftpio/ftpio.c
@@ -14,7 +14,7 @@
* Turned inside out. Now returns xfers as new file ids, not as a special
* `state' of FTP_t
*
- * $Id: ftpio.c,v 1.9 1996/08/03 11:58:53 jkh Exp $
+ * $Id: ftpio.c,v 1.10 1996/08/21 01:12:10 jkh Exp $
*
*/
@@ -676,9 +676,10 @@ ftp_file_op(FTP_t ftp, char *operation, char *file, FILE **fp, char *mode, int *
if (i < 0 || FTP_TIMEOUT(i)) {
close(s);
ftp->errno = i;
+ *seekto = 0;
return i;
}
- else if (i != 350)
+ else if (i == 350)
*seekto = 0;
}
i = cmd(ftp, "%s %s", operation, file);