mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 12:28:19 -04:00
Catch attempts to event_base_once a persistent event.
svn:r1250
This commit is contained in:
parent
1959414120
commit
37bc34662b
5
event.c
5
event.c
@ -930,8 +930,9 @@ event_base_once(struct event_base *base, evutil_socket_t fd, short events,
|
|||||||
struct timeval etv;
|
struct timeval etv;
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
/* We cannot support signals that just fire once */
|
/* We cannot support signals that just fire once, or persistent
|
||||||
if (events & EV_SIGNAL)
|
* events. */
|
||||||
|
if (events & (EV_SIGNAL|EV_PERSIST))
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
if ((eonce = mm_calloc(1, sizeof(struct event_once))) == NULL)
|
if ((eonce = mm_calloc(1, sizeof(struct event_once))) == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user