- More work with Igor Novoseltsev to first fix the remaining stuff for
removing easy handles from multi handles when the easy handle is/was within a HTTP pipeline. His bug report #2351653 (http://curl.haxx.se/bug/view.cgi?id=2351653) was also related and was eventually fixed by a patch by Igor himself.
This commit is contained in:
parent
3ca360391a
commit
792279581b
7
CHANGES
7
CHANGES
@ -6,6 +6,13 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Daniel Stenberg (12 Dec 2008)
|
||||||
|
- More work with Igor Novoseltsev to first fix the remaining stuff for
|
||||||
|
removing easy handles from multi handles when the easy handle is/was within
|
||||||
|
a HTTP pipeline. His bug report #2351653
|
||||||
|
(http://curl.haxx.se/bug/view.cgi?id=2351653) was also related and was
|
||||||
|
eventually fixed by a patch by Igor himself.
|
||||||
|
|
||||||
Yang Tse (12 Dec 2008)
|
Yang Tse (12 Dec 2008)
|
||||||
- Patrick Monnerat fixed a build regression, introduced in 7.19.2, affecting
|
- Patrick Monnerat fixed a build regression, introduced in 7.19.2, affecting
|
||||||
OS/400 compilations with IPv6 enabled.
|
OS/400 compilations with IPv6 enabled.
|
||||||
|
@ -10,9 +10,6 @@ To be addressed in 7.19.3 (planned release: January 2009)
|
|||||||
197 - IIS-bug in Digest
|
197 - IIS-bug in Digest
|
||||||
- libcurl parts done, no curl options added yet
|
- libcurl parts done, no curl options added yet
|
||||||
|
|
||||||
199 - "Bug 2351645" adjustment of the patch Daniel S applied
|
|
||||||
- Suggested fix posted to list
|
|
||||||
|
|
||||||
201 - "bug: header data output to the body callback function after set header"
|
201 - "bug: header data output to the body callback function after set header"
|
||||||
by Shunlong Bai
|
by Shunlong Bai
|
||||||
|
|
||||||
|
16
lib/multi.c
16
lib/multi.c
@ -587,6 +587,8 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
|||||||
|
|
||||||
if(easy) {
|
if(easy) {
|
||||||
bool premature = (bool)(easy->state != CURLM_STATE_COMPLETED);
|
bool premature = (bool)(easy->state != CURLM_STATE_COMPLETED);
|
||||||
|
bool easy_owns_conn = (bool)(easy->easy_conn &&
|
||||||
|
(easy->easy_conn->data == easy->easy_handle));
|
||||||
|
|
||||||
/* If the 'state' is not INIT or COMPLETED, we might need to do something
|
/* 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. */
|
nice to put the easy_handle in a good known state when this returns. */
|
||||||
@ -624,7 +626,7 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
|||||||
|
|
||||||
/* we must call Curl_done() here (if we still "own it") so that we don't
|
/* we must call Curl_done() here (if we still "own it") so that we don't
|
||||||
leave a half-baked one around */
|
leave a half-baked one around */
|
||||||
if (easy->easy_conn->data == easy->easy_handle) {
|
if (easy_owns_conn) {
|
||||||
|
|
||||||
/* Curl_done() clears the conn->data field to lose the association
|
/* Curl_done() clears the conn->data field to lose the association
|
||||||
between the easy handle and the connection
|
between the easy handle and the connection
|
||||||
@ -676,9 +678,15 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
|||||||
to that since we're not part of that handle anymore */
|
to that since we're not part of that handle anymore */
|
||||||
easy->easy_handle->state.connc = NULL;
|
easy->easy_handle->state.connc = NULL;
|
||||||
|
|
||||||
/* and modify the connectindex since this handle can't point to the
|
/* Modify the connectindex since this handle can't point to the
|
||||||
connection cache anymore */
|
connection cache anymore.
|
||||||
if(easy->easy_conn &&
|
|
||||||
|
TODO: consider if this is really what we want. The connection cache
|
||||||
|
is within the multi handle and that owns the connections so we should
|
||||||
|
not need to touch connections like this when we just remove an easy
|
||||||
|
handle...
|
||||||
|
*/
|
||||||
|
if(easy->easy_conn && easy_owns_conn &&
|
||||||
(easy->easy_conn->send_pipe->size +
|
(easy->easy_conn->send_pipe->size +
|
||||||
easy->easy_conn->recv_pipe->size == 0))
|
easy->easy_conn->recv_pipe->size == 0))
|
||||||
easy->easy_conn->connectindex = -1;
|
easy->easy_conn->connectindex = -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user