diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-11-09 15:18:59 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-11-09 15:18:59 -0500 |
commit | 1ac5b2303aab11dee3d2030a2c9bee466f002772 (patch) | |
tree | 3086c52ca39285344d77e1a81d08497d4d866903 /bufferevent_filter.c | |
parent | fc7b1b005c906d720e03975224ae809974402f55 (diff) | |
download | libevent-1ac5b2303aab11dee3d2030a2c9bee466f002772.tar.gz |
Only clear underlying callbacks when the user hasn't reset them.
Diffstat (limited to 'bufferevent_filter.c')
-rw-r--r-- | bufferevent_filter.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bufferevent_filter.c b/bufferevent_filter.c index 0608f4a4..0287803c 100644 --- a/bufferevent_filter.c +++ b/bufferevent_filter.c @@ -233,8 +233,9 @@ be_filter_destruct(struct bufferevent *bev) } } else { if (bevf->underlying) { - bufferevent_setcb(bevf->underlying, - NULL, NULL, NULL, NULL); + if (bevf->underlying->errorcb == be_filter_eventcb) + bufferevent_setcb(bevf->underlying, + NULL, NULL, NULL, NULL); bufferevent_unsuspend_read(bevf->underlying, BEV_SUSPEND_FILT_READ); } |