mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 04:19:10 -04:00
Fix locking in bufferevent_get_options_().
This commit is contained in:
parent
31db8a02bd
commit
dbc9cd4dd1
@ -825,10 +825,12 @@ bufferevent_get_options_(struct bufferevent *bev)
|
|||||||
{
|
{
|
||||||
struct bufferevent_private *bev_p =
|
struct bufferevent_private *bev_p =
|
||||||
EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
|
EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
|
||||||
|
enum bufferevent_options options;
|
||||||
|
|
||||||
BEV_LOCK(bev);
|
BEV_LOCK(bev);
|
||||||
return bev_p->options;
|
options = bev_p->options;
|
||||||
BEV_UNLOCK(bev);
|
BEV_UNLOCK(bev);
|
||||||
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user