From 2dde2f180d7d31bc817416a8117ee58fe458207d Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Sun, 14 Feb 2010 09:36:55 +0100 Subject: [PATCH] Revert "Add a fail_cb to evhttp_request for connection failures" The fail_cb extension was actually never needed; we've migrated away from it, so let's clean that up now. This reverts commit 1ffcbdae274fe71eeda14806764df0c40e45a636. --- src/evhttp/evhttp.h | 3 --- src/evhttp/http.c | 6 +----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/evhttp/evhttp.h b/src/evhttp/evhttp.h index 1f3ac4b4..a5069f87 100644 --- a/src/evhttp/evhttp.h +++ b/src/evhttp/evhttp.h @@ -232,9 +232,6 @@ struct { void (*cb)(struct evhttp_request *, void *); void *cb_arg; - void (*fail_cb)(struct evhttp_request *, void *); - void *fail_cb_arg; - /* * Chunked data callback - call for each completed chunk if * specified. If not specified, all the data is delivered via diff --git a/src/evhttp/http.c b/src/evhttp/http.c index a6a02111..70a97535 100644 --- a/src/evhttp/http.c +++ b/src/evhttp/http.c @@ -654,11 +654,7 @@ evhttp_connection_fail(struct evhttp_connection *evcon, * reply before the connection can be freed. */ if (evhttp_connection_incoming_fail(req, error) == -1) - { - if (req->fail_cb) - req->fail_cb(req, req->fail_cb_arg); - evhttp_connection_free(evcon); - } + evhttp_connection_free(evcon); return; }