mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Call underlying bev ctrl GET_FD on filtered bufferevents
Fixes: #611 Fixes: #610 (cherry picked from commit 4055081499cba32642dd72427a8f9d3ad7e50e79)
This commit is contained in:
parent
4f0f40e31e
commit
ebfac51797
@ -605,6 +605,7 @@ be_filter_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
|
||||
data->ptr = bevf->underlying;
|
||||
return 0;
|
||||
case BEV_CTRL_SET_FD:
|
||||
case BEV_CTRL_GET_FD:
|
||||
bevf = upcast(bev);
|
||||
|
||||
if (bevf->underlying &&
|
||||
@ -614,8 +615,6 @@ be_filter_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
|
||||
}
|
||||
EVUTIL_FALLTHROUGH;
|
||||
|
||||
case BEV_CTRL_GET_FD:
|
||||
EVUTIL_FALLTHROUGH;
|
||||
case BEV_CTRL_CANCEL_ALL:
|
||||
EVUTIL_FALLTHROUGH;
|
||||
default:
|
||||
|
@ -569,8 +569,8 @@ test_bufferevent_filters_impl(int use_pair, int disable)
|
||||
|
||||
tt_ptr_op(bufferevent_get_underlying(bev1), ==, bev1_base);
|
||||
tt_ptr_op(bufferevent_get_underlying(bev2), ==, bev2_base);
|
||||
tt_int_op(bufferevent_getfd(bev1), ==, -1);
|
||||
tt_int_op(bufferevent_getfd(bev2), ==, -1);
|
||||
tt_int_op(bufferevent_getfd(bev1), ==, bufferevent_getfd(bev1_base));
|
||||
tt_int_op(bufferevent_getfd(bev2), ==, bufferevent_getfd(bev2_base));
|
||||
|
||||
bufferevent_disable(bev1, EV_READ);
|
||||
bufferevent_enable(bev2, EV_READ);
|
||||
|
Loading…
x
Reference in New Issue
Block a user