mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Merge pull request #239 from ellzey/issue237
Call underlying bev ctrl SET_FD on filtered bufferevents
This commit is contained in:
commit
d76b23110f
@ -536,10 +536,20 @@ be_filter_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
|
||||
bevf = upcast(bev);
|
||||
data->ptr = bevf->underlying;
|
||||
return 0;
|
||||
case BEV_CTRL_GET_FD:
|
||||
case BEV_CTRL_SET_FD:
|
||||
bevf = upcast(bev);
|
||||
|
||||
if (bevf->underlying &&
|
||||
bevf->underlying->be_ops &&
|
||||
bevf->underlying->be_ops->ctrl) {
|
||||
return (bevf->underlying->be_ops->ctrl)(bevf->underlying, op, data);
|
||||
}
|
||||
|
||||
case BEV_CTRL_GET_FD:
|
||||
case BEV_CTRL_CANCEL_ALL:
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user