aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-08-02 16:52:12 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-08-02 16:52:12 +0000
commit3e0a95bb78212e9112b00f8dc8b52367ea675c47 (patch)
tree6db4609984f4bb54b5d267aa9b3c680e6447e5f2
parentf0efa89484b419d2713a28c250685047bd48a159 (diff)
FD_ZERO() the keepfd variables properly when keepon is modified (Tomasz Lacki
reported 12 Jul 2001)
-rw-r--r--lib/transfer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 0374da0da..5bdbefd1b 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -302,6 +302,7 @@ Transfer(struct connectdata *c_conn)
we bail out from this! */
else if (0 >= (signed int) nread) {
keepon &= ~KEEP_READ;
+ FD_ZERO(&rkeepfd);
break;
}
@@ -711,6 +712,7 @@ Transfer(struct connectdata *c_conn)
else if(CHUNKE_STOP == res) {
/* we're done reading chunks! */
keepon &= ~KEEP_READ; /* read no more */
+ FD_ZERO(&rkeepfd);
/* There are now possibly N number of bytes at the end of the
str buffer that weren't written to the client, but we don't
@@ -724,7 +726,9 @@ Transfer(struct connectdata *c_conn)
nread = conn->maxdownload - bytecount;
if((signed int)nread < 0 ) /* this should be unusual */
nread = 0;
+
keepon &= ~KEEP_READ; /* we're done reading */
+ FD_ZERO(&rkeepfd);
}
bytecount += nread;
@@ -758,6 +762,7 @@ Transfer(struct connectdata *c_conn)
if ((signed int)nread<=0) {
/* done */
keepon &= ~KEEP_WRITE; /* we're done writing */
+ FD_ZERO(&wkeepfd);
break;
}
writebytecount += nread;