Created
January 28, 2015 18:28
-
-
Save jehiah/7f380c9f3f80af8a9703 to your computer and use it in GitHub Desktop.
Bitly patches for libevent-1.4.14b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -urp libevent-1.4.14b-stable/configure libevent-1.4.14b-stable-fix/configure | |
--- libevent-1.4.14b-stable/configure 2010-06-20 09:06:18.000000000 -0400 | |
+++ libevent-1.4.14b-stable-fix/configure 2012-05-09 15:14:09.000000000 -0400 | |
@@ -2988,7 +2988,7 @@ fi | |
# Define the identity of the package. | |
PACKAGE=libevent | |
- VERSION=1.4.14b-stable | |
+ VERSION=1.4.14b-bitly2 | |
cat >>confdefs.h <<_ACEOF | |
diff -urp libevent-1.4.14b-stable/http.c libevent-1.4.14b-stable-fix/http.c | |
--- cb-libevent-1.4.14b-stable/http.c 2014-05-02 16:44:52.000000000 -0400 | |
+++ cb-libevent-1.4.14b-stable-fix/http.c 2014-05-02 16:45:32.000000000 -0400 | |
@@ -687,9 +687,13 @@ | |
evhttp_write(int fd, short what, void *arg) | |
{ | |
struct evhttp_connection *evcon = arg; | |
+ struct evhttp_request *req = TAILQ_FIRST(&evcon->requests); | |
int n; | |
if (what == EV_TIMEOUT) { | |
+ if (req != NULL) { | |
+ req->userdone = 1; | |
+ } | |
evhttp_connection_fail(evcon, EVCON_HTTP_TIMEOUT); | |
return; | |
} | |
@@ -927,6 +931,7 @@ | |
int n, len; | |
if (what == EV_TIMEOUT) { | |
+ req->userdone = 1; | |
evhttp_connection_fail(evcon, EVCON_HTTP_TIMEOUT); | |
return; | |
} | |
@@ -2231,6 +2236,7 @@ | |
if (req->uri == NULL) { | |
event_debug(("%s: bad request", __func__)); | |
if (req->evcon->state == EVCON_DISCONNECTED) { | |
+ req->userdone = 1; | |
evhttp_connection_fail(req->evcon, EVCON_HTTP_EOF); | |
} else { | |
event_debug(("%s: sending error", __func__)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment