]> jfr.im git - irc/quakenet/newserv.git/commitdiff
CORE: fflush logfile and stderr on Error().
authorChris Porter <redacted>
Sat, 26 Jun 2010 01:07:34 +0000 (01:07 +0000)
committerChris Porter <redacted>
Sat, 26 Jun 2010 01:07:34 +0000 (01:07 +0000)
core/error.c

index edd986990bb5e7056f329c07c9c3fa5a3a403e1c..5beb8c88f05a8a648831aee6b6544dc577a3619d 100644 (file)
@@ -75,8 +75,12 @@ void Error(char *source, int severity, char *reason, ... ) {
     tm=gmtime(&now);
     strftime(timebuf,100,"%Y-%m-%d %H:%M:%S",tm);
     fprintf(stderr,"[%s] %s(%s): %s\n",timebuf,sevtostring(severity),source,buf);
-    if (logfile) 
+    fflush(stderr);
+
+    if (logfile)  {
       fprintf(logfile,"[%s] %s(%s): %s\n",timebuf,sevtostring(severity),source,buf);
+      fflush(logfile);
+    }
   }
   
   if (severity>=ERR_STOP) {