summaryrefslogtreecommitdiff
path: root/bufferevent.c
diff options
context:
space:
mode:
authorMaxime Henrion <mhenrion@appnexus.com>2013-05-23 16:29:17 +0000
committerNick Mathewson <nickm@torproject.org>2013-05-24 11:04:11 -0400
commit31db8a02bd74957f9ae836a38043cd9589c2d325 (patch)
tree73cbc95096fa8711582eb0b465b38d7ef800591d /bufferevent.c
parent1f29b18f51cb7080c1ffe5f51557979b71451b6a (diff)
downloadlibevent-31db8a02bd74957f9ae836a38043cd9589c2d325.tar.gz
Fix a double close() bug in evhttp when the underlying bufferevent uses BEV_OPT_CLOSE_ON_FREE.
Diffstat (limited to 'bufferevent.c')
-rw-r--r--bufferevent.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/bufferevent.c b/bufferevent.c
index 49c1f2bc..f2f84438 100644
--- a/bufferevent.c
+++ b/bufferevent.c
@@ -820,6 +820,18 @@ bufferevent_getfd(struct bufferevent *bev)
return (res<0) ? -1 : d.fd;
}
+enum bufferevent_options
+bufferevent_get_options_(struct bufferevent *bev)
+{
+ struct bufferevent_private *bev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+
+ BEV_LOCK(bev);
+ return bev_p->options;
+ BEV_UNLOCK(bev);
+}
+
+
static void
bufferevent_cancel_all_(struct bufferevent *bev)
{