History log of /openbsd-current/lib/libevent/event.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.42 27-Dec-2022 jmc

spelling fixes; from paul tagliamonte
ok nicm


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.41 01-May-2019 jca

Tweaks previous: gettime() can be void, use TIMESPEC_TO_TIMEVAL

ok nicm@ tobias@ cheloha@


# 1.40 01-May-2019 jca

Require clock_gettime(CLOCK_MONOTONIC) and remove fallback code

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@


# 1.39 29-Apr-2019 tobias

Switched min_heap to size_t to prevent integer overflows.

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


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.38 06-Jan-2015 bluhm

Backout revision 1.37. Setting ev->ev_pncalls to NULL results in
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@


# 1.37 06-Jan-2015 bluhm

Apply commit 2d8cf0b720cdd5f9f292f174a10ff74e62a380ec from upstream.
- Defensive programming to prevent (hopefully impossible) stack-stomping
OK nicm@


# 1.36 30-Oct-2014 bluhm

Fix whitespace errors in libevent.
OK nicm@


# 1.35 29-Oct-2014 bluhm

After removing all the #ifdef, the wrappers in evutil are rather
useless. Let libevent call the libc functions directly.
OK nicm@


# 1.34 17-Oct-2014 bluhm

Remove #ifdef HAVE_backend and remove references to unimplemented
backends.
OK nicm@


# 1.33 17-Oct-2014 bluhm

Remove some #ifdef HAVE_syscall.
OK nicm@


# 1.32 17-Oct-2014 bluhm

Remove #ifdef HAVE_.*_H, just include the header files.
Do not include sys/param.h.
OK nicm@


# 1.31 16-Oct-2014 bluhm

Remove #ifdef HAVE_CONFIG_H, there is no config.h file.
OK nicm@


# 1.30 08-Oct-2014 bluhm

iRemove the #ifdef WIN32 implementation from libevent.
OK nicm@


# 1.29 01-Sep-2014 bluhm

The libevent event_log() function called by event_msgx() adds a new
line itself. Do not print a double new line when EVENT_SHOW_METHOD
is set.
OK nicm@


Revision tags: OPENBSD_5_6_BASE
# 1.28 03-Apr-2014 eric

add helper functions to use asr with libevent.

ok deraadt@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.27 17-Apr-2013 deraadt

(long long) and %lld for big time_t
ok nicm, who will pass it upstream


Revision tags: OPENBSD_5_3_BASE
# 1.26 28-Aug-2012 pascal

Expose _EVENT_VERSION in event.h. This is expected by net/tor, which will spew
out scary warnings if it's not there. Bump minor accordingly.

Requested by and ok dcoppa@, ok nicm@


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.25 30-Aug-2010 nicm

Fix from upstream to make all backends reinit on event_reinit(). This
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


Revision tags: OPENBSD_4_8_BASE
# 1.24 12-Jul-2010 nicm

Update to 1.4.14b.

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


# 1.23 21-Apr-2010 nicm

Clean up the awful _EVENT_* poo in the libevent headers, and don't
install event-config.h.

Pointed out by deraadt.


# 1.22 21-Apr-2010 nicm

Update libevent to 1.4.13.

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


Revision tags: OPENBSD_4_7_BASE
# 1.21 12-Nov-2009 deraadt

change back to preferring kqueue, now that nicm, tedu and i have
fixed it (or, all the issues we are aware of so far).
discussed with nicm


# 1.20 30-Oct-2009 deraadt

stop using kqueue.


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.19 02-May-2008 brad

- Use a const pointer for bufferevent_write.
- Make event_init return struct event_base *.

From the libevent SVN repo.

ok millert@


# 1.18 02-May-2008 brad

Update to libevent 1.3e while retaining our local changes.

"No objection" millert@
"the diff looks and works fine" reyk@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.17 19-Mar-2007 millert

Update to libevent-1.3b while retaining our local changes. beck@ OK


Revision tags: OPENBSD_4_1_BASE
# 1.16 13-Feb-2007 millert

Avoid double recacl when loop_once is used.
From libevent SVN via brad@.


# 1.15 04-Feb-2007 millert

Two libevent fixes from the SVN repo:
allow gotsig to terminate active event loop and evbuffer_find fix.
OK brad@ pyr@


# 1.14 05-Nov-2006 brad

fix a potential memory leak in event_once().

From Niels Provos via the libevent SVN repo, by Scott Lamb

tested by niallo@

ok deraadt@


Revision tags: OPENBSD_4_0_BASE
# 1.13 30-Mar-2006 brad

introduce a way to free the base.

From libevent CVS


# 1.12 28-Mar-2006 brad

use clock_gettime if available.

From claudio@ via libevent CVS

ok claudio@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.11 02-Jul-2005 grunk

zap trailing whitespaces, no binary change

ok brad@ beck@


# 1.10 04-May-2005 brad

update to libevent 1.0d; keep local changes

thanks to Alexander von Gernler for testing
and some bug fixes

ok mpf@ norby@


# 1.9 22-Apr-2005 brad

update to libevent 1.0c; keep local changes

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@


# 1.8 19-Apr-2005 deraadt

backout. not discussed, and very wrong. bad brad


# 1.7 19-Apr-2005 brad

update to libevent 1.0c; keep local changes


# 1.6 13-Apr-2005 reyk

use "volatile sig_atomic_t" types instead of "int" for signal flags.

ok deraadt@ henning@ provos


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.5 28-Apr-2004 brad

update to libevent 0.8; keep local changes

ok markus@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.4 09-Jul-2003 markus

update to libevent-0.7a.tar.gz; keep local changes


# 1.3 19-Jun-2003 mickey

constify constant structures; niels ok


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.2 25-Jun-2002 mickey

rcsids


# 1.1 15-Jun-2002 provos

branches: 1.1.1;
Initial revision


# 1.41 01-May-2019 jca

Tweaks previous: gettime() can be void, use TIMESPEC_TO_TIMEVAL

ok nicm@ tobias@ cheloha@


# 1.40 01-May-2019 jca

Require clock_gettime(CLOCK_MONOTONIC) and remove fallback code

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@


# 1.39 29-Apr-2019 tobias

Switched min_heap to size_t to prevent integer overflows.

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


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.38 06-Jan-2015 bluhm

Backout revision 1.37. Setting ev->ev_pncalls to NULL results in
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@


# 1.37 06-Jan-2015 bluhm

Apply commit 2d8cf0b720cdd5f9f292f174a10ff74e62a380ec from upstream.
- Defensive programming to prevent (hopefully impossible) stack-stomping
OK nicm@


# 1.36 30-Oct-2014 bluhm

Fix whitespace errors in libevent.
OK nicm@


# 1.35 29-Oct-2014 bluhm

After removing all the #ifdef, the wrappers in evutil are rather
useless. Let libevent call the libc functions directly.
OK nicm@


# 1.34 17-Oct-2014 bluhm

Remove #ifdef HAVE_backend and remove references to unimplemented
backends.
OK nicm@


# 1.33 17-Oct-2014 bluhm

Remove some #ifdef HAVE_syscall.
OK nicm@


# 1.32 17-Oct-2014 bluhm

Remove #ifdef HAVE_.*_H, just include the header files.
Do not include sys/param.h.
OK nicm@


# 1.31 16-Oct-2014 bluhm

Remove #ifdef HAVE_CONFIG_H, there is no config.h file.
OK nicm@


# 1.30 08-Oct-2014 bluhm

iRemove the #ifdef WIN32 implementation from libevent.
OK nicm@


# 1.29 01-Sep-2014 bluhm

The libevent event_log() function called by event_msgx() adds a new
line itself. Do not print a double new line when EVENT_SHOW_METHOD
is set.
OK nicm@


Revision tags: OPENBSD_5_6_BASE
# 1.28 03-Apr-2014 eric

add helper functions to use asr with libevent.

ok deraadt@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.27 17-Apr-2013 deraadt

(long long) and %lld for big time_t
ok nicm, who will pass it upstream


Revision tags: OPENBSD_5_3_BASE
# 1.26 28-Aug-2012 pascal

Expose _EVENT_VERSION in event.h. This is expected by net/tor, which will spew
out scary warnings if it's not there. Bump minor accordingly.

Requested by and ok dcoppa@, ok nicm@


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.25 30-Aug-2010 nicm

Fix from upstream to make all backends reinit on event_reinit(). This
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


Revision tags: OPENBSD_4_8_BASE
# 1.24 12-Jul-2010 nicm

Update to 1.4.14b.

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


# 1.23 21-Apr-2010 nicm

Clean up the awful _EVENT_* poo in the libevent headers, and don't
install event-config.h.

Pointed out by deraadt.


# 1.22 21-Apr-2010 nicm

Update libevent to 1.4.13.

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


Revision tags: OPENBSD_4_7_BASE
# 1.21 12-Nov-2009 deraadt

change back to preferring kqueue, now that nicm, tedu and i have
fixed it (or, all the issues we are aware of so far).
discussed with nicm


# 1.20 30-Oct-2009 deraadt

stop using kqueue.


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.19 02-May-2008 brad

- Use a const pointer for bufferevent_write.
- Make event_init return struct event_base *.

From the libevent SVN repo.

ok millert@


# 1.18 02-May-2008 brad

Update to libevent 1.3e while retaining our local changes.

"No objection" millert@
"the diff looks and works fine" reyk@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.17 19-Mar-2007 millert

Update to libevent-1.3b while retaining our local changes. beck@ OK


Revision tags: OPENBSD_4_1_BASE
# 1.16 13-Feb-2007 millert

Avoid double recacl when loop_once is used.
From libevent SVN via brad@.


# 1.15 04-Feb-2007 millert

Two libevent fixes from the SVN repo:
allow gotsig to terminate active event loop and evbuffer_find fix.
OK brad@ pyr@


# 1.14 05-Nov-2006 brad

fix a potential memory leak in event_once().

From Niels Provos via the libevent SVN repo, by Scott Lamb

tested by niallo@

ok deraadt@


Revision tags: OPENBSD_4_0_BASE
# 1.13 30-Mar-2006 brad

introduce a way to free the base.

From libevent CVS


# 1.12 28-Mar-2006 brad

use clock_gettime if available.

From claudio@ via libevent CVS

ok claudio@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.11 02-Jul-2005 grunk

zap trailing whitespaces, no binary change

ok brad@ beck@


# 1.10 04-May-2005 brad

update to libevent 1.0d; keep local changes

thanks to Alexander von Gernler for testing
and some bug fixes

ok mpf@ norby@


# 1.9 22-Apr-2005 brad

update to libevent 1.0c; keep local changes

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@


# 1.8 19-Apr-2005 deraadt

backout. not discussed, and very wrong. bad brad


# 1.7 19-Apr-2005 brad

update to libevent 1.0c; keep local changes


# 1.6 13-Apr-2005 reyk

use "volatile sig_atomic_t" types instead of "int" for signal flags.

ok deraadt@ henning@ provos


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.5 28-Apr-2004 brad

update to libevent 0.8; keep local changes

ok markus@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.4 09-Jul-2003 markus

update to libevent-0.7a.tar.gz; keep local changes


# 1.3 19-Jun-2003 mickey

constify constant structures; niels ok


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.2 25-Jun-2002 mickey

rcsids


# 1.1 15-Jun-2002 provos

branches: 1.1.1;
Initial revision


# 1.39 29-Apr-2019 tobias

Switched min_heap to size_t to prevent integer overflows.

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


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.38 06-Jan-2015 bluhm

Backout revision 1.37. Setting ev->ev_pncalls to NULL results in
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@


# 1.37 06-Jan-2015 bluhm

Apply commit 2d8cf0b720cdd5f9f292f174a10ff74e62a380ec from upstream.
- Defensive programming to prevent (hopefully impossible) stack-stomping
OK nicm@


# 1.36 30-Oct-2014 bluhm

Fix whitespace errors in libevent.
OK nicm@


# 1.35 29-Oct-2014 bluhm

After removing all the #ifdef, the wrappers in evutil are rather
useless. Let libevent call the libc functions directly.
OK nicm@


# 1.34 17-Oct-2014 bluhm

Remove #ifdef HAVE_backend and remove references to unimplemented
backends.
OK nicm@


# 1.33 17-Oct-2014 bluhm

Remove some #ifdef HAVE_syscall.
OK nicm@


# 1.32 17-Oct-2014 bluhm

Remove #ifdef HAVE_.*_H, just include the header files.
Do not include sys/param.h.
OK nicm@


# 1.31 16-Oct-2014 bluhm

Remove #ifdef HAVE_CONFIG_H, there is no config.h file.
OK nicm@


# 1.30 08-Oct-2014 bluhm

iRemove the #ifdef WIN32 implementation from libevent.
OK nicm@


# 1.29 01-Sep-2014 bluhm

The libevent event_log() function called by event_msgx() adds a new
line itself. Do not print a double new line when EVENT_SHOW_METHOD
is set.
OK nicm@


Revision tags: OPENBSD_5_6_BASE
# 1.28 03-Apr-2014 eric

add helper functions to use asr with libevent.

ok deraadt@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.27 17-Apr-2013 deraadt

(long long) and %lld for big time_t
ok nicm, who will pass it upstream


Revision tags: OPENBSD_5_3_BASE
# 1.26 28-Aug-2012 pascal

Expose _EVENT_VERSION in event.h. This is expected by net/tor, which will spew
out scary warnings if it's not there. Bump minor accordingly.

Requested by and ok dcoppa@, ok nicm@


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.25 30-Aug-2010 nicm

Fix from upstream to make all backends reinit on event_reinit(). This
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


Revision tags: OPENBSD_4_8_BASE
# 1.24 12-Jul-2010 nicm

Update to 1.4.14b.

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


# 1.23 21-Apr-2010 nicm

Clean up the awful _EVENT_* poo in the libevent headers, and don't
install event-config.h.

Pointed out by deraadt.


# 1.22 21-Apr-2010 nicm

Update libevent to 1.4.13.

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


Revision tags: OPENBSD_4_7_BASE
# 1.21 12-Nov-2009 deraadt

change back to preferring kqueue, now that nicm, tedu and i have
fixed it (or, all the issues we are aware of so far).
discussed with nicm


# 1.20 30-Oct-2009 deraadt

stop using kqueue.


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.19 02-May-2008 brad

- Use a const pointer for bufferevent_write.
- Make event_init return struct event_base *.

From the libevent SVN repo.

ok millert@


# 1.18 02-May-2008 brad

Update to libevent 1.3e while retaining our local changes.

"No objection" millert@
"the diff looks and works fine" reyk@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.17 19-Mar-2007 millert

Update to libevent-1.3b while retaining our local changes. beck@ OK


Revision tags: OPENBSD_4_1_BASE
# 1.16 13-Feb-2007 millert

Avoid double recacl when loop_once is used.
From libevent SVN via brad@.


# 1.15 04-Feb-2007 millert

Two libevent fixes from the SVN repo:
allow gotsig to terminate active event loop and evbuffer_find fix.
OK brad@ pyr@


# 1.14 05-Nov-2006 brad

fix a potential memory leak in event_once().

From Niels Provos via the libevent SVN repo, by Scott Lamb

tested by niallo@

ok deraadt@


Revision tags: OPENBSD_4_0_BASE
# 1.13 30-Mar-2006 brad

introduce a way to free the base.

From libevent CVS


# 1.12 28-Mar-2006 brad

use clock_gettime if available.

From claudio@ via libevent CVS

ok claudio@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.11 02-Jul-2005 grunk

zap trailing whitespaces, no binary change

ok brad@ beck@


# 1.10 04-May-2005 brad

update to libevent 1.0d; keep local changes

thanks to Alexander von Gernler for testing
and some bug fixes

ok mpf@ norby@


# 1.9 22-Apr-2005 brad

update to libevent 1.0c; keep local changes

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@


# 1.8 19-Apr-2005 deraadt

backout. not discussed, and very wrong. bad brad


# 1.7 19-Apr-2005 brad

update to libevent 1.0c; keep local changes


# 1.6 13-Apr-2005 reyk

use "volatile sig_atomic_t" types instead of "int" for signal flags.

ok deraadt@ henning@ provos


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.5 28-Apr-2004 brad

update to libevent 0.8; keep local changes

ok markus@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.4 09-Jul-2003 markus

update to libevent-0.7a.tar.gz; keep local changes


# 1.3 19-Jun-2003 mickey

constify constant structures; niels ok


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.2 25-Jun-2002 mickey

rcsids


# 1.1 15-Jun-2002 provos

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.38 06-Jan-2015 bluhm

Backout revision 1.37. Setting ev->ev_pncalls to NULL results in
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@


# 1.37 06-Jan-2015 bluhm

Apply commit 2d8cf0b720cdd5f9f292f174a10ff74e62a380ec from upstream.
- Defensive programming to prevent (hopefully impossible) stack-stomping
OK nicm@


# 1.36 30-Oct-2014 bluhm

Fix whitespace errors in libevent.
OK nicm@


# 1.35 29-Oct-2014 bluhm

After removing all the #ifdef, the wrappers in evutil are rather
useless. Let libevent call the libc functions directly.
OK nicm@


# 1.34 17-Oct-2014 bluhm

Remove #ifdef HAVE_backend and remove references to unimplemented
backends.
OK nicm@


# 1.33 17-Oct-2014 bluhm

Remove some #ifdef HAVE_syscall.
OK nicm@


# 1.32 17-Oct-2014 bluhm

Remove #ifdef HAVE_.*_H, just include the header files.
Do not include sys/param.h.
OK nicm@


# 1.31 16-Oct-2014 bluhm

Remove #ifdef HAVE_CONFIG_H, there is no config.h file.
OK nicm@


# 1.30 08-Oct-2014 bluhm

iRemove the #ifdef WIN32 implementation from libevent.
OK nicm@


# 1.29 01-Sep-2014 bluhm

The libevent event_log() function called by event_msgx() adds a new
line itself. Do not print a double new line when EVENT_SHOW_METHOD
is set.
OK nicm@


Revision tags: OPENBSD_5_6_BASE
# 1.28 03-Apr-2014 eric

add helper functions to use asr with libevent.

ok deraadt@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.27 17-Apr-2013 deraadt

(long long) and %lld for big time_t
ok nicm, who will pass it upstream


Revision tags: OPENBSD_5_3_BASE
# 1.26 28-Aug-2012 pascal

Expose _EVENT_VERSION in event.h. This is expected by net/tor, which will spew
out scary warnings if it's not there. Bump minor accordingly.

Requested by and ok dcoppa@, ok nicm@


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.25 30-Aug-2010 nicm

Fix from upstream to make all backends reinit on event_reinit(). This
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


Revision tags: OPENBSD_4_8_BASE
# 1.24 12-Jul-2010 nicm

Update to 1.4.14b.

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


# 1.23 21-Apr-2010 nicm

Clean up the awful _EVENT_* poo in the libevent headers, and don't
install event-config.h.

Pointed out by deraadt.


# 1.22 21-Apr-2010 nicm

Update libevent to 1.4.13.

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


Revision tags: OPENBSD_4_7_BASE
# 1.21 12-Nov-2009 deraadt

change back to preferring kqueue, now that nicm, tedu and i have
fixed it (or, all the issues we are aware of so far).
discussed with nicm


# 1.20 30-Oct-2009 deraadt

stop using kqueue.


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.19 02-May-2008 brad

- Use a const pointer for bufferevent_write.
- Make event_init return struct event_base *.

From the libevent SVN repo.

ok millert@


# 1.18 02-May-2008 brad

Update to libevent 1.3e while retaining our local changes.

"No objection" millert@
"the diff looks and works fine" reyk@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.17 19-Mar-2007 millert

Update to libevent-1.3b while retaining our local changes. beck@ OK


Revision tags: OPENBSD_4_1_BASE
# 1.16 13-Feb-2007 millert

Avoid double recacl when loop_once is used.
From libevent SVN via brad@.


# 1.15 04-Feb-2007 millert

Two libevent fixes from the SVN repo:
allow gotsig to terminate active event loop and evbuffer_find fix.
OK brad@ pyr@


# 1.14 05-Nov-2006 brad

fix a potential memory leak in event_once().

From Niels Provos via the libevent SVN repo, by Scott Lamb

tested by niallo@

ok deraadt@


Revision tags: OPENBSD_4_0_BASE
# 1.13 30-Mar-2006 brad

introduce a way to free the base.

From libevent CVS


# 1.12 28-Mar-2006 brad

use clock_gettime if available.

From claudio@ via libevent CVS

ok claudio@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.11 02-Jul-2005 grunk

zap trailing whitespaces, no binary change

ok brad@ beck@


# 1.10 04-May-2005 brad

update to libevent 1.0d; keep local changes

thanks to Alexander von Gernler for testing
and some bug fixes

ok mpf@ norby@


# 1.9 22-Apr-2005 brad

update to libevent 1.0c; keep local changes

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@


# 1.8 19-Apr-2005 deraadt

backout. not discussed, and very wrong. bad brad


# 1.7 19-Apr-2005 brad

update to libevent 1.0c; keep local changes


# 1.6 13-Apr-2005 reyk

use "volatile sig_atomic_t" types instead of "int" for signal flags.

ok deraadt@ henning@ provos


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.5 28-Apr-2004 brad

update to libevent 0.8; keep local changes

ok markus@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.4 09-Jul-2003 markus

update to libevent-0.7a.tar.gz; keep local changes


# 1.3 19-Jun-2003 mickey

constify constant structures; niels ok


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.2 25-Jun-2002 mickey

rcsids


# 1.1 15-Jun-2002 provos

branches: 1.1.1;
Initial revision