From 840e796aa9c12a94bec90ee2a0bd49ee3163deb1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 6 Dec 2006 09:37:40 +0000 Subject: Sebastien Willemijns reported bug #1603712 (http://curl.haxx.se/bug/view.cgi?id=1603712) which is about connections getting cut off prematurely when --limit-rate is used. While I found no such problems in my tests nor in my reading of the code, I found that the --limit-rate code was severly flawed (since it was moved into the lib, since 7.15.5) when used with the easy interface and it didn't work as documented so I reworked it somewhat and now it works for my tests. --- lib/urldata.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/urldata.h') diff --git a/lib/urldata.h b/lib/urldata.h index f16cf10bc..6baf3dba7 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -503,12 +503,14 @@ struct hostname { /* * Flags on the keepon member of the Curl_transfer_keeper */ -enum { - KEEP_NONE, - KEEP_READ, - KEEP_WRITE -}; +#define KEEP_NONE 0 +#define KEEP_READ 1 /* there is or may be data to read */ +#define KEEP_WRITE 2 /* there is or may be data to write */ +#define KEEP_READ_HOLD 4 /* when set, no reading should be done but there + might still be data to read */ +#define KEEP_WRITE_HOLD 8 /* when set, no writing should be done but there + might still be data to write */ /* * This struct is all the previously local variables from Curl_perform() moved -- cgit v1.2.3