aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-08-25 13:53:20 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-08-25 13:53:20 +0000
commit2ff609dd43cb5c1c0da893c080132a48a2d4c73b (patch)
treec93c102708f2c0b25a1cbf6c3bd193b211ccfeeb
parentda48a6ba87f76f64287bb14bcae37b1aa00a0a0a (diff)
Armel Asselin reported that the 'running_handles' counter wasn't updated
properly if you removed a "live" handle from a multi handle with curl_multi_remove_handle().
-rw-r--r--CHANGES5
-rw-r--r--RELEASE-NOTES4
-rw-r--r--lib/multi.c4
3 files changed, 12 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index b57bf84b8..ab0a8fd3e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,11 @@
Changelog
+Daniel (25 August 2006)
+- Armel Asselin reported that the 'running_handles' counter wasn't updated
+ properly if you removed a "live" handle from a multi handle with
+ curl_multi_remove_handle().
+
Daniel (22 August 2006)
- David McCreedy fixed a remaining mistake from the August 19 TYPE change.
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 586c01e0c..cc014a2b3 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -16,7 +16,9 @@ This release includes the following changes:
This release includes the following bugfixes:
- p (FTP) EPRT transfers with IPv6 didn't work properly
+ o running_handles' counter wasn't always updated properly when
+ curl_multi_remove_handle() was used
+ o (FTP) EPRT transfers with IPv6 didn't work properly
o (FTP) SINGLECWD mode and using files in the root dir
o (HTTP) Expect: header disabling work better
o (HTTP) "Expect: 100-continue" disable on second POST on re-used connection
diff --git a/lib/multi.c b/lib/multi.c
index d822bda52..c1ff12e29 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -386,6 +386,10 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
if(easy) {
/* If the 'state' is not INIT or COMPLETED, we might need to do something
nice to put the easy_handle in a good known state when this returns. */
+ if(easy->state != CURLM_STATE_COMPLETED)
+ /* this handle is "alive" so we need to count down the total number of
+ alive connections when this is removed */
+ multi->num_alive--;
/* The timer must be shut down before easy->multi is set to NULL,
else the timenode will remain in the splay tree after