summaryrefslogtreecommitdiff
path: root/lib/libevent
AgeCommit message (Collapse)Author
2018-09-23Document bufferevent_setwatermark(). Initial diff from Geoff Hill on tech@ withanton
some tweaks. With feedback and ok jmc@
2018-07-26Mention some missing libevent macros.rob
ok jmc@, benno@, "yes" deraadt@
2017-08-01add missing and correct misspelled names, most in NAME sections;Ingo Schwarze
found with regress/usr.bin/mandoc/db/dbm_dump; OK jmc@
2017-07-10if there are no changes for kevent, pass in NULL instead.Ted Unangst
this has no effect except to make ktrace output prettier. ok bluhm mpi
2017-06-29take const off the timeval argument in the pending functions.David Gwynne
event_pending, evtimer_pending, and signal_pending all write to the timeval because that's how they tell the caller when the event is meant to fire. ok deraadt@ millert@ jmc@ schwarze@
2017-03-18Use recallocarray() to avoid leaving detritus in memory when resizingTheo de Raadt
the string buffer. ok jsing millert
2016-09-03Remove NULL pointer checks before calls to free().Nayden Markatchev
OK bluhm@ nicm@
2016-07-17Talk about event API instead of libeventStefan Kempf
Avoids inconsistent capitalization of libevent at start of sentence suggested by and ok jmc@, ok bluhm@
2016-03-30for some time now mandoc has not required MLINKS to functionJason McIntyre
correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
2016-03-20Currently we have about a 50/50 split over fcntl(n, F_GETFL [,0])Kenneth R Westerback
idioms. Adopt the more concise fcntl(n, F_GETFL) over fcntl(n, F_GETFL, 0) where it is obvious further investigation will not yield and even better way. Obviousness evaluation and ok guenther@
2015-12-25revert change to call kevent immediately.Ted Unangst
tcpbench (at a minimum) relies on the old behavior of changes all happening after all event handlers run. in particular, it resets the event for the listening socket *before* calling accept(), when it is still readable. kevent then (correctly) says it is readable on the next go through the loop. silly, subtle, and stupid. problem reported by kettenis
2015-12-16change the kqueue backend to call kevent() as events are added insteadTed Unangst
of deferring until the dispatch loop. kqueue support for various types of files and filesystems has been historically incomplete, and kevent handles this condition by returning an error. the libevent dispatch loop has no way to recover from this error and fails catastrophically, bringing down the entire process because one file went bad. now, instead of all that happending, event_add will return an error. the application can choose to handle or ignore this error, but at least the band will play on. ok nicm
2015-12-11Libraries should not print to stderr, ok tedu beck deraadtNicholas Marriott
2015-11-10update NAME section to include all documented functions,Jason McIntyre
or otherwise change Dt to reflect the name of an existing function; feedback/ok schwarze
2015-04-14Another couple of commas in the wrong place, ok jmcNicholas Marriott
2015-04-14Remove an extra comma pointed out by jmc@.Nicholas Marriott
2015-04-14Reorder prototypes to better match manpage layout and add some missingNicholas Marriott
argument names, from Fabian Raetz. ok deraadt
2015-02-05Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@Todd C. Miller
2015-01-06Backout revision 1.37. Setting ev->ev_pncalls to NULL results inAlexander Bluhm
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@
2015-01-06Apply commit e0e6958aa074a7714cd7c4aa779a1dfede3a03b1 from upstream.Alexander Bluhm
- Avoid deadlock when activating signals. Fixes bug 3048812. Based on patch by Nicholas Marriott. The deadlock was ultimately fixed in a different way (by disabling reinit - see event.c r1.25). Add it now for consistency but without the Windows compatibility code. Convert the fnctl() calls to SOCK_CLOEXEC | SOCK_NONBLOCK to simplify the code. OK nicm@
2015-01-06Apply commit 2d8cf0b720cdd5f9f292f174a10ff74e62a380ec from upstream.Alexander Bluhm
- Defensive programming to prevent (hopefully impossible) stack-stomping OK nicm@
2015-01-05Fix CVE-2014-6272 in Libevent 1.4 from upstream:Alexander Bluhm
- https://github.com/libevent/libevent/commit/7b21c4eabf1f3946d3f63cce1319c490caab8ecf - For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. On top of that do: - Update libevent version to 1.4.15-stable. - Use SIZE_MAX from limits.h instead of a private define. - Do not declare 'size_t need' twice to avoid a compiler warning. OK sthen
2014-11-21libraries shouldnt print to stderr when things dont go their way.David Gwynne
switch fprintf(stderr) over to event_warn() on malloc failure. fix up an errant newline in an existing event_warn while there. originally i just wanted to delete the fprintf diff from nicm@ who is away from a keyboard right now so cant commit guenther@ agrees with the idea
2014-11-21evbuffer_read will return 0 one an end of file condition.David Gwynne
2014-11-20zap some stray commas;Jason McIntyre
2014-11-20add evbuffer_expand to NAME;Jason McIntyre
2014-11-20put MLINKS in the order they appear in the man page, so i don;t go blindJason McIntyre
trying to check what's missing;
2014-11-20document the only macro i find useful when working with evbuffers.David Gwynne
2014-11-20might help to Xr evbuffer_new 3David Gwynne
2014-11-20im not good at grammar things.David Gwynne
from schwarze@
2014-11-20use .Va to say errno is a variable.David Gwynne
from schwarze@
2014-11-19fix erroneous capitalisation of a word in the middle of a sentence.David Gwynne
from schwarze again
2014-11-19less worse escapes for \ from ingo. im sure there's a much nicer way toDavid Gwynne
represent newlines still.
2014-11-19use .In to specify includes.David Gwynne
2014-11-19ingo also points out we're documenting things that work withDavid Gwynne
evbuffers, not evbufbuffers.
2014-11-19ingo points outDavid Gwynne
.Fo evbuffer_readln .Fa "struct evbuffer *buf" .Fa "size_t *read_out" .Fa "enum evbuffer_eol_style eol_style" .Fc is more readable mdoc for very long prototypes than lines like .Fn "evbuffer_readln" "struct evbuffer *buf" "size_t *read_out" "enum evbuffer_eol_style eol_style"
2014-11-19i got sick of having to read the source code to know what theDavid Gwynne
evbuffer_foo functions do. reyk, nicm, jmc, and schwarze seem to support a manpage as a reasonable solution to this problem. im putting this in a separate manpage because i find they get too cumbersome when they get too big. ingo agrees (and suggests even this might be too big). the file is evbuffer_new.3 rather than evbuffer.3 because we document functions. ok reyk@ nicm@ jmc@ schwarze@ this is rough, everyone has tweaks coming.
2014-11-19BUGS is no longer relevant, according to nicm;Jason McIntyre
2014-10-31Libevent has compatibilty wrappers in evutil. OpenBSD does not useAlexander Bluhm
them anymore, but evutil is still part of libevent's interface. Separate the API of evutil from libevent and do not include evutil.h from event.h automatically. A version bump is not necessary as the library itself does not change. Bulk ports build done by landry@ had no fallout. OK nicm@ deraadt@
2014-10-31Use CDIAGFLAGS from bsd.own.mk and append additional warning flags.Alexander Bluhm
All warnings have been fixed in libevent. OK nicm@
2014-10-30Fix whitespace errors in libevent.Alexander Bluhm
OK nicm@
2014-10-30The fdsz and n_events variables contain unsigned values that areAlexander Bluhm
derived from size_t and passed to functions as size_t parameters. Change them from int to size_t to avoid compiler warnings. OK doug@ nicm@
2014-10-29After removing all the #ifdef, the wrappers in evutil are ratherAlexander Bluhm
useless. Let libevent call the libc functions directly. OK nicm@
2014-10-29Remove workaround for Mac OS X kqueue bug.Alexander Bluhm
OK nicm@
2014-10-29Do not cast a (const void *) pointer to (void *) to avoid a warning.Alexander Bluhm
OK nicm@
2014-10-18Remove some #ifdef from libevent.Alexander Bluhm
OK nicm@
2014-10-18Remove the remaining #ifdef HAVE_ and the #define _GNU_SOURCE.Alexander Bluhm
OK nicm@
2014-10-17Remove #ifdef HAVE_backend and remove references to unimplementedAlexander Bluhm
backends. OK nicm@
2014-10-17Remove some #ifdef HAVE_syscall.Alexander Bluhm
OK nicm@
2014-10-17Remove #ifdef HAVE_.*_H, just include the header files.Alexander Bluhm
Do not include sys/param.h. OK nicm@