From: Nick Mathewson Date: Wed, 29 Apr 2009 20:48:28 +0000 (+0000) Subject: Catch attempts to event_base_once a persistent event. X-Git-Tag: release-2.0.3-alpha~263 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37bc34662b22afd96e44e81c4da251383a1a8f15;p=libevent Catch attempts to event_base_once a persistent event. svn:r1250 --- diff --git a/event.c b/event.c index f09f4ff2..bf8d78c3 100644 --- a/event.c +++ b/event.c @@ -930,8 +930,9 @@ event_base_once(struct event_base *base, evutil_socket_t fd, short events, struct timeval etv; int res = 0; - /* We cannot support signals that just fire once */ - if (events & EV_SIGNAL) + /* We cannot support signals that just fire once, or persistent + * events. */ + if (events & (EV_SIGNAL|EV_PERSIST)) return (-1); if ((eonce = mm_calloc(1, sizeof(struct event_once))) == NULL)