summaryrefslogtreecommitdiff
path: root/bufferevent_filter.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-07-28 04:03:57 +0000
committerNick Mathewson <nickm@torproject.org>2009-07-28 04:03:57 +0000
commit709c21c48ca541c75bf803e6801c335d8ae3d043 (patch)
treeff87cc257ecf83765377ef01ce8c29cfa5d69cab /bufferevent_filter.c
parentb06b2649b4c7f5feaedea97c31001c14708e4d1f (diff)
downloadlibevent-709c21c48ca541c75bf803e6801c335d8ae3d043.tar.gz
Bufferevent support for openssl.
This code adds a new Bufferevent type that is only compiled when the openssl library is present. It supports using an SSL object and an event alert mechanism, which can either be an fd or an underlying bufferevent. There is still more work to do: the unit tests are incomplete, and we need to support flush and shutdown much better. Sometimes events are generated needlessly: this will hose performance. There's a new encrypting proxy in sample/le-proxy.c. This code has only been tested on OSX, and nowhere else. svn:r1382
Diffstat (limited to 'bufferevent_filter.c')
-rw-r--r--bufferevent_filter.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/bufferevent_filter.c b/bufferevent_filter.c
index a77a9524..5da8aaf6 100644
--- a/bufferevent_filter.c
+++ b/bufferevent_filter.c
@@ -187,12 +187,7 @@ bufferevent_filter_new(struct bufferevent *underlying,
return NULL;
}
if (options & BEV_OPT_THREADSAFE) {
- void *lock = BEV_UPCAST(underlying)->lock;
- if (!lock) {
- bufferevent_enable_locking(underlying, NULL);
- lock = BEV_UPCAST(underlying)->lock;
- }
- bufferevent_enable_locking(downcast(bufev_f), lock);
+ bufferevent_enable_locking(downcast(bufev_f), NULL);
}
bufev_f->underlying = underlying;