]> code.citadel.org Git - citadel.git/commitdiff
Follow syslog change here, else we won't compile.
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 26 Feb 2011 10:26:27 +0000 (11:26 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sat, 26 Feb 2011 10:26:27 +0000 (11:26 +0100)
citadel/ecrash.c

index 2ac94574d6383c8cbf4144cea24929baad9ca370..6c2bb848940d1b4ddaab67b557ccf478631b804a 100644 (file)
@@ -185,14 +185,8 @@ static void outputPrintf(char *format, ...)
 
        va_start(ap, format);
 
-       if (enable_syslog)
-       {
-               snprintf (StaticBuf, SIZ, format, ap);
-               syslog( LOG_CRIT|LOG_NDELAY|LOG_MAIL, StaticBuf);
-       }
-       else
-               syslog(LOG_EMERG, format, ap);
-
+       snprintf (StaticBuf, SIZ, format, ap);
+       syslog( LOG_CRIT|LOG_NDELAY|LOG_MAIL, StaticBuf);
 } // outputPrintf
 
 
@@ -208,25 +202,18 @@ static void createGlobalBacktrace( void )
 {
 
        size = backtrace(stack_frames, sizeof(stack_frames) / sizeof(void*));
-       if (enable_syslog)
-               for (NThread = 0; NThread < size; NThread++) 
-               {
-                       snprintf (StaticBuf, SIZ, "RAW: %p  ", stack_frames[NThread]);
-                       syslog( LOG_CRIT|LOG_NDELAY|LOG_MAIL, StaticBuf);
-               }
-       else 
-               for (NThread = 0; NThread < size; NThread++) 
-                       syslog(LOG_ALERT, "RAW: %p\n", stack_frames[NThread]);
+       for (NThread = 0; NThread < size; NThread++) 
+       {
+               snprintf (StaticBuf, SIZ, "RAW: %p  ", stack_frames[NThread]);
+               syslog( LOG_CRIT|LOG_NDELAY|LOG_MAIL, StaticBuf);
+       }
+       
        strings = backtrace_symbols(stack_frames, size);
        for (NThread = 0; NThread < size; NThread++) {
                if (strings != NULL) {
-                       if (enable_syslog)
-                       {// vsyslogs printf compliance sucks.
-                               snprintf (StaticBuf, SIZ, "RAW: %p  ", strings[NThread]);
-                               syslog( LOG_CRIT|LOG_NDELAY|LOG_MAIL, StaticBuf);
-                       }
-                       else
-                               syslog(LOG_ALERT, "%s\n", strings[NThread]);
+                       // vsyslogs printf compliance sucks.
+                       snprintf (StaticBuf, SIZ, "RAW: %p  ", strings[NThread]);
+                       syslog( LOG_CRIT|LOG_NDELAY|LOG_MAIL, StaticBuf);
                }
        }
 } /* createGlobalBacktrace */
@@ -234,15 +221,11 @@ static void outputRawtrace( void )
 {
 
        size = backtrace(stack_frames, sizeof(stack_frames) / sizeof(void*));
-       if (enable_syslog)
-               for (NThread = 0; NThread < size; NThread++) 
-               {
-                       snprintf (StaticBuf, SIZ, "RAW: %p  ", stack_frames[NThread]);
-                       syslog( LOG_CRIT|LOG_NDELAY|LOG_MAIL, StaticBuf);
-               }
-       else 
-               for (NThread = 0; NThread < size; NThread++) 
-                       syslog(LOG_ALERT, "RAW: %p\n", stack_frames[NThread]);
+       for (NThread = 0; NThread < size; NThread++) 
+       {
+               snprintf (StaticBuf, SIZ, "RAW: %p  ", stack_frames[NThread]);
+               syslog( LOG_CRIT|LOG_NDELAY|LOG_MAIL, StaticBuf);
+       }
 } /* createGlobalBacktrace */
 
 /*!