From 031a803071ee10547089c3962ce99423ed338b14 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 16 Dec 2013 12:02:21 -0500 Subject: [PATCH 1/3] Clarify event_base_loop exit conditions --- include/event2/event.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/event2/event.h b/include/event2/event.h index 700e8ca1..677471fe 100644 --- a/include/event2/event.h +++ b/include/event2/event.h @@ -351,14 +351,14 @@ int event_reinit(struct event_base *base); /** Event dispatching loop - This loop will run the event base until either there are no more added - events, or until something calls event_base_loopbreak() or + This loop will run the event base until either there are no more pending or + active, or until something calls event_base_loopbreak() or event_base_loopexit(). @param base the event_base structure returned by event_base_new() or event_base_new_with_config() - @return 0 if successful, -1 if an error occurred, or 1 if no events were - registered. + @return 0 if successful, -1 if an error occurred, or 1 if we exited because + no events were pending or active. @see event_base_loop() */ int event_base_dispatch(struct event_base *); @@ -645,15 +645,15 @@ int event_base_set(struct event_base *, struct event *); This is a more flexible version of event_base_dispatch(). By default, this loop will run the event base until either there are no more - added events, or until something calls event_base_loopbreak() or + pending or active, or until something calls event_base_loopbreak() or evenet_base_loopexit(). You can override this behavior with the 'flags' argument. @param eb the event_base structure returned by event_base_new() or event_base_new_with_config() @param flags any combination of EVLOOP_ONCE | EVLOOP_NONBLOCK - @return 0 if successful, -1 if an error occurred, or 1 if no events were - registered. + @return 0 if successful, -1 if an error occurred, or 1 if we exited because + no events were pending or active. @see event_base_loopexit(), event_base_dispatch(), EVLOOP_ONCE, EVLOOP_NONBLOCK */ From cec62cb80a689f84470f8424ed70d39e8854f981 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 20 Dec 2013 13:31:29 -0500 Subject: [PATCH 2/3] Typo fixes from Linus Nordberg --- include/event2/bufferevent.h | 6 +++--- include/event2/event.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/event2/bufferevent.h b/include/event2/bufferevent.h index 7ce4e8f8..0cc6cb1c 100644 --- a/include/event2/bufferevent.h +++ b/include/event2/bufferevent.h @@ -44,10 +44,10 @@ with bufferevent_enable() and bufferevent_disable(). When reading is enabled, the bufferevent will try to read from the - file descriptor onto its input buffer, and and call the read callback. + file descriptor onto its input buffer, and call the read callback. When writing is enabled, the bufferevent will try to write data onto its - file descriptor when writing is enabled, and call the write callback - when the output buffer is sufficiently drained. + file descriptor when the output buffer has enough data, and call the write + callback when the output buffer is sufficiently drained. Bufferevents come in several flavors, including: diff --git a/include/event2/event.h b/include/event2/event.h index 700e8ca1..1da95560 100644 --- a/include/event2/event.h +++ b/include/event2/event.h @@ -646,7 +646,7 @@ int event_base_set(struct event_base *, struct event *); By default, this loop will run the event base until either there are no more added events, or until something calls event_base_loopbreak() or - evenet_base_loopexit(). You can override this behavior with the 'flags' + event_base_loopexit(). You can override this behavior with the 'flags' argument. @param eb the event_base structure returned by event_base_new() or From 8cd695bf6dbe891c0e23589ca691891e5b76083d Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 20 Dec 2013 13:31:29 -0500 Subject: [PATCH 3/3] Typo fixes from Linus Nordberg --- include/event2/bufferevent.h | 6 +++--- include/event2/event.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/event2/bufferevent.h b/include/event2/bufferevent.h index 7ce4e8f8..0cc6cb1c 100644 --- a/include/event2/bufferevent.h +++ b/include/event2/bufferevent.h @@ -44,10 +44,10 @@ with bufferevent_enable() and bufferevent_disable(). When reading is enabled, the bufferevent will try to read from the - file descriptor onto its input buffer, and and call the read callback. + file descriptor onto its input buffer, and call the read callback. When writing is enabled, the bufferevent will try to write data onto its - file descriptor when writing is enabled, and call the write callback - when the output buffer is sufficiently drained. + file descriptor when the output buffer has enough data, and call the write + callback when the output buffer is sufficiently drained. Bufferevents come in several flavors, including: diff --git a/include/event2/event.h b/include/event2/event.h index 677471fe..b75f61d2 100644 --- a/include/event2/event.h +++ b/include/event2/event.h @@ -646,7 +646,7 @@ int event_base_set(struct event_base *, struct event *); By default, this loop will run the event base until either there are no more pending or active, or until something calls event_base_loopbreak() or - evenet_base_loopexit(). You can override this behavior with the 'flags' + event_base_loopexit(). You can override this behavior with the 'flags' argument. @param eb the event_base structure returned by event_base_new() or