diff options
author | Linus Nordberg <linus@nordu.net> | 2011-09-22 12:30:12 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2011-09-22 12:30:12 +0200 |
commit | 59c3dd89f38fd34091ae909e47d7cc71650ce672 (patch) | |
tree | 5d3f28b25bd2e17f91f8f324a943de6230521df3 /lib/event.c | |
parent | ade6c4fa17f837504a3902296d4b4f636e28b51e (diff) |
event_enable_debug_mode() must be called at most once.
Diffstat (limited to 'lib/event.c')
-rw-r--r-- | lib/event.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/event.c b/lib/event.c index 5afba98..ff05012 100644 --- a/lib/event.c +++ b/lib/event.c @@ -24,6 +24,10 @@ #include "conn.h" #include "debug.h" +#if defined (DEBUG) +extern int _event_debug_mode_on; +#endif + static void _evlog_cb (int severity, const char *msg) { @@ -243,7 +247,8 @@ event_init_eventbase (struct rs_connection *conn) return RSE_OK; #if defined (DEBUG) - event_enable_debug_mode (); + if (!_event_debug_mode_on) + event_enable_debug_mode (); #endif event_set_log_callback (_evlog_cb); conn->evb = event_base_new (); |