EVENT-Backtrace enableable on its own by now.
[citadel.git] / citadel / event_client.c
index 927e18bd0d75a440807219a587dbc47653400737..697fd7bcd87a0e171e54fd24090a11b82e2a9a5d 100644 (file)
@@ -976,6 +976,7 @@ int InitcURLIOStruct(AsyncIO *IO,
 
 }
 
+extern int DebugEventLoopBacktrace;
 void EV_backtrace(AsyncIO *IO)
 {
 #ifdef HAVE_BACKTRACE
@@ -983,7 +984,7 @@ void EV_backtrace(AsyncIO *IO)
        size_t size, i;
        char **strings;
 
-       if (IO == NULL)
+       if ((IO == NULL) || (DebugEventLoopBacktrace == 0))
                return;
        size = backtrace(stack_frames, sizeof(stack_frames) / sizeof(void*));
        strings = backtrace_symbols(stack_frames, size);