summaryrefslogtreecommitdiffstats
path: root/lib/libevent/event.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Tweaks previous: gettime() can be void, use TIMESPEC_TO_TIMEVALjca2019-05-011-9/+5
| | | | ok nicm@ tobias@ cheloha@
* Require clock_gettime(CLOCK_MONOTONIC) and remove fallback codejca2019-05-011-66/+8
| | | | | | | | | If clock_gettime(CLOCK_MONOTONIC) fails here, something is really wrong. Lots of userland already require it anyway. Removing the fallback code means less code, less global state and less fiddling with the timeheap internals. ok nicm@ tedu@ tobias@ cheloha@
* Switched min_heap to size_t to prevent integer overflows.tobias2019-04-291-4/+5
| | | | | | | | | | Also, as deraadt suggested, switched realloc to recallocarray to at least prevent uninitialized memory to be used as pointers in case of other programming errors. A proper solution (not using an array) needs more work. This change occured in sync with upstream libevent 2.2. with input by and ok bluhm, jca, tedu
* Backout revision 1.37. Setting ev->ev_pncalls to NULL results inbluhm2015-01-061-5/+2
| | | | | | | a use after free if the callback has freed the ev. With F in malloc.conf both tmux and the regression tests triggered a segmentation fault. OK nicm@
* Apply commit 2d8cf0b720cdd5f9f292f174a10ff74e62a380ec from upstream.bluhm2015-01-061-2/+5
| | | | | - Defensive programming to prevent (hopefully impossible) stack-stomping OK nicm@
* Fix whitespace errors in libevent.bluhm2014-10-301-11/+11
| | | | OK nicm@
* After removing all the #ifdef, the wrappers in evutil are ratherbluhm2014-10-291-17/+16
| | | | | useless. Let libevent call the libc functions directly. OK nicm@
* Remove #ifdef HAVE_backend and remove references to unimplementedbluhm2014-10-171-31/+1
| | | | | backends. OK nicm@
* Remove some #ifdef HAVE_syscall.bluhm2014-10-171-5/+1
| | | | OK nicm@
* Remove #ifdef HAVE_.*_H, just include the header files.bluhm2014-10-171-5/+2
| | | | | Do not include sys/param.h. OK nicm@
* Remove #ifdef HAVE_CONFIG_H, there is no config.h file.bluhm2014-10-161-4/+1
| | | | OK nicm@
* iRemove the #ifdef WIN32 implementation from libevent.bluhm2014-10-081-14/+1
| | | | OK nicm@
* The libevent event_log() function called by event_msgx() adds a newbluhm2014-09-011-3/+2
| | | | | | line itself. Do not print a double new line when EVENT_SHOW_METHOD is set. OK nicm@
* add helper functions to use asr with libevent.eric2014-04-031-1/+66
| | | | ok deraadt@
* (long long) and %lld for big time_tderaadt2013-04-171-4/+4
| | | | ok nicm, who will pass it upstream
* Expose _EVENT_VERSION in event.h. This is expected by net/tor, which will spewpascal2012-08-281-2/+2
| | | | | | out scary warnings if it's not there. Bump minor accordingly. Requested by and ok dcoppa@, ok nicm@
* Fix from upstream to make all backends reinit on event_reinit(). Thisnicm2010-08-301-2/+7
| | | | | | | | | | was not being done for poll and select, so after fork they would remain using the same socketpair for signal notification, leading to a race between the two processes to read from it and hangs. Problem originally reported by kili@. ok gilles
* Update to 1.4.14b.nicm2010-07-121-4/+26
| | | | | | | | | | | | | | From their change log: o Fix memory-leak of signal handler array with kqueue. [backport] o Make evutil_make_socket_nonblocking() leave any other flags alone. o Adjusted fcntl() retval comparison on evutil_make_socket_nonblocking(). o Re-add event_siglcb; some old code _was_ still using it. :( o Fix a free(NULL) in min_heap.h o Clean up properly when adding a signal handler fails. Also a local change to use an int rather than a long for fcntl(). ok guenther deraadt
* Clean up the awful _EVENT_* poo in the libevent headers, and don'tnicm2010-04-211-2/+2
| | | | | | install event-config.h. Pointed out by deraadt.
* Update libevent to 1.4.13.nicm2010-04-211-165/+244
| | | | | | | | | | | | | This is the core library only, the DNS parts are removed and it does not include the other extra bits (HTTP, DNS, and RPC), a separate port for these will appear in due course. Thanks to jsg, sthen, alek, gilles, jacekm, bernd and any others I've forgotten for testing/comments. Note that /usr/include/evdns.h should be removed after updating. ok deraadt
* change back to preferring kqueue, now that nicm, tedu and i havederaadt2009-11-121-4/+4
| | | | | fixed it (or, all the issues we are aware of so far). discussed with nicm
* stop using kqueue.deraadt2009-10-301-4/+4
|
* - Use a const pointer for bufferevent_write.brad2008-05-021-2/+2
| | | | | | | | - Make event_init return struct event_base *. From the libevent SVN repo. ok millert@
* Update to libevent 1.3e while retaining our local changes.brad2008-05-021-62/+111
| | | | | "No objection" millert@ "the diff looks and works fine" reyk@
* Update to libevent-1.3b while retaining our local changes. beck@ OKmillert2007-03-191-8/+20
|
* Avoid double recacl when loop_once is used.millert2007-02-131-8/+5
| | | | From libevent SVN via brad@.
* Two libevent fixes from the SVN repo:millert2007-02-041-1/+3
| | | | | allow gotsig to terminate active event loop and evbuffer_find fix. OK brad@ pyr@
* fix a potential memory leak in event_once().brad2006-11-051-2/+7
| | | | | | | | From Niels Provos via the libevent SVN repo, by Scott Lamb tested by niallo@ ok deraadt@
* introduce a way to free the base.brad2006-03-301-1/+29
| | | | From libevent CVS
* use clock_gettime if available.brad2006-03-281-8/+30
| | | | | | From claudio@ via libevent CVS ok claudio@
* zap trailing whitespaces, no binary changegrunk2005-07-021-4/+4
| | | | ok brad@ beck@
* update to libevent 1.0d; keep local changesbrad2005-05-041-2/+3
| | | | | | | thanks to Alexander von Gernler for testing and some bug fixes ok mpf@ norby@
* update to libevent 1.0c; keep local changesbrad2005-04-221-114/+294
| | | | | | | | | | no shared lib so no ABI/API check is necessary thanks to Alexander von Gernler for submitting another diff in an attempt to update libevent and for a use-after-free fix. ok henning@ deraadt@
* backout. not discussed, and very wrong. bad bradderaadt2005-04-191-294/+114
|
* update to libevent 1.0c; keep local changesbrad2005-04-191-114/+294
|
* use "volatile sig_atomic_t" types instead of "int" for signal flags.reyk2005-04-131-4/+5
| | | | ok deraadt@ henning@ provos
* update to libevent 0.8; keep local changesbrad2004-04-281-42/+136
| | | | ok markus@
* update to libevent-0.7a.tar.gz; keep local changesmarkus2003-07-091-7/+47
|
* constify constant structures; niels okmickey2003-06-191-5/+5
|
* rcsidsmickey2002-06-251-0/+2
|
* import libevent an event notification abstraction on top of select or kqueueprovos2002-06-151-0/+496
supporting timeout and signal callsbacks, too. okay deraadt@ millert@