(file) Return to Fatal.c CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Executor

Diff for /pegasus/src/Executor/Fatal.c between version 1.1.2.3 and 1.1.2.4

version 1.1.2.3, 2007/01/11 16:01:23 version 1.1.2.4, 2007/01/12 00:34:38
Line 37 
Line 37 
 #include "Log.h" #include "Log.h"
 #include "Exit.h" #include "Exit.h"
 #include "Globals.h" #include "Globals.h"
   #include "Strlcpy.h"
   #include "Strlcat.h"
  
 /* /*
 **============================================================================== **==============================================================================
Line 53 
Line 55 
  
 void Fatal(const char* file, size_t line, const char* format, ...) void Fatal(const char* file, size_t line, const char* format, ...)
 { {
     Log(LL_FATAL, "%s(%d): Fatal() called", file, (int)line);      char buffer[EXECUTOR_BUFFER_SIZE];
       char lineStr[32];
   
       /* Prepend "__FILE__(__LINE__): FATAL: " to format. */
   
       Strlcpy(buffer, file, sizeof(buffer));
       Strlcat(buffer, "(", sizeof(buffer));
       sprintf(lineStr, "%u", (unsigned int)line);
       Strlcat(buffer, lineStr, sizeof(buffer));
       Strlcat(buffer, "): FATAL: ", sizeof(buffer));
       Strlcat(buffer,  format, sizeof(buffer));
  
     /* Print to syslog. */     /* Print to syslog. */
     {     {
         va_list ap;         va_list ap;
         va_start(ap, format);         va_start(ap, format);
         vsyslog(LOG_CRIT, format, ap);          vsyslog(LOG_CRIT, buffer, ap);
         va_end(ap);         va_end(ap);
     }     }
  
Line 67 
Line 79 
     {     {
         va_list ap;         va_list ap;
  
         fprintf(stderr, "%s: %s(%d): ", globals.argv[0], file, (int)line);          fprintf(stderr, "%s: ", globals.argv[0]);
         va_start(ap, format);         va_start(ap, format);
         /* Flawfinder: ignore */         /* Flawfinder: ignore */
         vfprintf(stderr, format, ap);          vfprintf(stderr, buffer, ap);
         va_end(ap);         va_end(ap);
         fputc('\n', stderr);         fputc('\n', stderr);
     }     }


Legend:
Removed from v.1.1.2.3  
changed lines
  Added in v.1.1.2.4

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2