mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Sanity-check arguments to event_base_active_by_fd()
This commit is contained in:
parent
93369ff4e9
commit
5c9da9a8a8
2
event.c
2
event.c
@ -3636,7 +3636,7 @@ void
|
||||
event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short events)
|
||||
{
|
||||
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
|
||||
evmap_io_active_(base, fd, events);
|
||||
evmap_io_active_(base, fd, events & (EV_READ|EV_WRITE|EV_TIMEOUT));
|
||||
EVBASE_RELEASE_LOCK(base, th_base_lock);
|
||||
}
|
||||
|
||||
|
@ -1465,10 +1465,11 @@ void event_base_dump_events(struct event_base *, FILE *);
|
||||
|
||||
|
||||
/**
|
||||
Activates all events for the given fd and event mask.
|
||||
Activates all pending events for the given fd and event mask.
|
||||
|
||||
@param fd An fd or signal
|
||||
@param events One or more EV_* flags
|
||||
@param base the event_base on which to activate the events.
|
||||
@param fd An fd to active events on.
|
||||
@param events One or more of EV_{READ,WRITE,TIMEOUT}.
|
||||
*/
|
||||
void event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short events);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user