]> granicus.if.org Git - libevent/commitdiff
Add evhttp_connection_get_server().
authorMaxime Henrion <mhenrion@appnexus.com>
Wed, 24 Jul 2013 20:50:05 +0000 (20:50 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 1 Aug 2013 01:55:13 +0000 (21:55 -0400)
http.c
include/event2/http.h

diff --git a/http.c b/http.c
index 2dc8206f70a27d05d503661ff63a4e5c407ccef7..55190e262abb5823379969b941ca81b9924df9e7 100644 (file)
--- a/http.c
+++ b/http.c
@@ -2253,6 +2253,12 @@ struct bufferevent* evhttp_connection_get_bufferevent(struct evhttp_connection *
        return evcon->bufev;
 }
 
+struct evhttp *
+evhttp_connection_get_server(struct evhttp_connection *evcon)
+{
+       return evcon->http_server;
+}
+
 struct evhttp_connection *
 evhttp_connection_base_new(struct event_base *base, struct evdns_base *dnsbase,
     const char *address, unsigned short port)
index 0428ea9e279091974109b32d56166153b9f95114..0db75ed4b97ec23d2adc718b58e1dfdf3dac4f98 100644 (file)
@@ -452,6 +452,11 @@ struct evhttp_connection *evhttp_connection_base_bufferevent_new(
  */
 struct bufferevent* evhttp_connection_get_bufferevent(struct evhttp_connection *evcon);
 
+/**
+ * Return the HTTP server associated with this connection, or NULL.
+ */
+struct evhttp *evhttp_connection_get_server(struct evhttp_connection *evcon);
+
 /**
  * Creates a new request object that needs to be filled in with the request
  * parameters.  The callback is executed when the request completed or an