]> granicus.if.org Git - libevent/commitdiff
Include disabled methods in event_get_supported_methods() output.
authorNick Mathewson <nickm@torproject.org>
Tue, 14 Jul 2009 19:19:45 +0000 (19:19 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 14 Jul 2009 19:19:45 +0000 (19:19 +0000)
Previously, events that were disabled using EVENT_NO* were left out of
event_get_supported_methods().  This was wrong, broke unit tests
(under some circumstances) and left the user with no good way to tell
which methods were actually compiled in.

Fixes bug 2821015.

svn:r1344

ChangeLog
event.c

index 27a6a571c1a0f136a854db2e194967185a1cb9e2..2ffe32d7f56161f86219b3f33e04828e516faa8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,7 +43,7 @@ Changes in 2.0.2-alpha:
  o Mitigate a race condition when using socket bufferevents in multiple threads.
  o Use AC_SEARCH_LIBS, not AC_CHECK_LIB to avoid needless library use.
  o Do not allow event_del(ev) to return while that event's callback is executing in another thread.  This fixes a nasty race condition.
-
+ o event_get_supported_methods() now lists methods that have been disabled with the EVENT_NO* environment options.
 
 Changes in 2.0.1-alpha:
  o free minheap on event_base_free(); from Christopher Layne
diff --git a/event.c b/event.c
index f8bc58016948e9d4ee0b3030a8c3186e86443c1e..ce325aff82027020d0a3921eedaf3e267ef08e7f 100644 (file)
--- a/event.c
+++ b/event.c
@@ -457,8 +457,6 @@ event_get_supported_methods(void)
 
        /* populate the array with the supported methods */
        for (k = 0, i = 0; eventops[k] != NULL; ++k) {
-               if (event_is_method_disabled(eventops[k]->name))
-                       continue;
                tmp[i++] = eventops[k]->name;
        }
        tmp[i] = NULL;