From: Nick Mathewson Date: Thu, 14 Feb 2013 19:13:11 +0000 (-0500) Subject: Merge remote-tracking branch 'origin/patches-2.0' X-Git-Tag: release-2.1.3-alpha~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97094614578b3f4e5c462ce9e3afee2a9705698c;p=libevent Merge remote-tracking branch 'origin/patches-2.0' --- 97094614578b3f4e5c462ce9e3afee2a9705698c diff --cc http.c index d07730d7,9b96ffb3..b94fed8c --- a/http.c +++ b/http.c @@@ -2328,8 -2179,10 +2328,10 @@@ evhttp_connection_get_peer(struct evhtt } int -evhttp_connection_connect(struct evhttp_connection *evcon) +evhttp_connection_connect_(struct evhttp_connection *evcon) { + int old_state = evcon->state; + if (evcon->state == EVCON_CONNECTING) return (0); diff --cc test/regress_http.c index 31412a20,9ece455b..3ed314a0 --- a/test/regress_http.c +++ b/test/regress_http.c @@@ -3034,8 -3013,11 +3034,11 @@@ http_stream_in_cancel_test(void *arg static void http_connection_fail_done(struct evhttp_request *req, void *arg) { + struct evhttp_connection *evcon = arg; + struct event_base *base = evhttp_connection_get_base(evcon); + /* An ENETUNREACH error results in an unrecoverable - * evhttp_connection error (see evhttp_connection_fail()). The + * evhttp_connection error (see evhttp_connection_fail_()). The * connection will be reset, and the user will be notified with a NULL * req parameter. */ tt_assert(!req);