Merge pull request #239 from ellzey/issue237

Call underlying bev ctrl SET_FD on filtered bufferevents
This commit is contained in:
Mark Ellzey 2015-05-13 01:10:42 -04:00
commit d76b23110f

View File

@ -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;
}