aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-05-09 21:34:48 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-05-09 21:34:48 +0000
commitfd5e69f7697c1230b618693ffa697e409a202271 (patch)
tree1584246b889ebd70e0e7d69f0ec2ef184fe9285e /lib
parentddb0b8d8b8b7be2c31d6d77cee9065eff4cb1833 (diff)
ConnectPlease() fixed for the new proxy connect functionality to make sure
'connected' truly is false when the socks connect fails. Curl_done() fixed for the check-conn->bits.done-before-Curl_getoff_all_pipelines case
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/url.c b/lib/url.c
index 684358067..402a49151 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2886,7 +2886,8 @@ static CURLcode ConnectPlease(struct SessionHandle *data,
if(*connected)
result = Curl_connected_proxy(conn);
}
- else
+
+ if(result)
*connected = FALSE; /* mark it as not connected */
return result;
@@ -4777,18 +4778,21 @@ CURLcode Curl_done(struct connectdata **connp,
Curl_expire(data, 0); /* stop timer */
- if(conn->bits.done ||
- (conn->send_pipe->size + conn->recv_pipe->size != 0 &&
+ if(conn->bits.done)
+ /* Stop if Curl_done() has already been called */
+ return CURLE_OK;
+
+ Curl_getoff_all_pipelines(data, conn);
+
+ if((conn->send_pipe->size + conn->recv_pipe->size != 0 &&
!data->set.reuse_forbid &&
!conn->bits.close))
- /* Stop if Curl_done() has already been called or pipeline
- is not empty and we do not have to close connection. */
+ /* Stop if pipeline is not empty and we do not have to close
+ connection. */
return CURLE_OK;
conn->bits.done = TRUE; /* called just now! */
- Curl_getoff_all_pipelines(data, conn);
-
/* Cleanup possible redirect junk */
if(data->req.newurl) {
free(data->req.newurl);