]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fix for libevent 1.2 versions.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 1 Feb 2008 12:53:02 +0000 (12:53 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 1 Feb 2008 12:53:02 +0000 (12:53 +0000)
git-svn-id: file:///svn/unbound/trunk@916 be551aaa-1e26-0410-a405-d3ace91eadb9

util/netevent.c

index 87a72e1069cf7664fcd2810b898ffd11620f5dfc..0e60ba2663a0457125fd56e67f285fce48c7c0fd 100644 (file)
@@ -129,10 +129,12 @@ comm_base_delete(struct comm_base* b)
 {
        if(!b)
                return;
-#ifdef HAVE_EVENT_BASE_FREE
-       /* only libevent 1.2+ has it */
+#if defined(HAVE_EVENT_BASE_FREE) && defined(HAVE_EVENT_BASE_ONCE)
+       /* only libevent 1.2+ has it, but in 1.2 it is broken - 
+          assertion fails on signal handling ev that is not deleted
+          in libevent 1.3c (event_base_once appears) this is fixed. */
        event_base_free(b->eb->base);
-#endif /* HAVE_EVENT_BASE_FREE */
+#endif /* HAVE_EVENT_BASE_FREE and HAVE_EVENT_BASE_ONCE */
        b->eb->base = NULL;
        free(b->eb);
        free(b);