mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 11:53:00 -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 =
|
||||
EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
|
||||
enum bufferevent_options options;
|
||||
|
||||
BEV_LOCK(bev);
|
||||
return bev_p->options;
|
||||
options = bev_p->options;
|
||||
BEV_UNLOCK(bev);
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user