diff -Nru gpm-1.20.1.orig/src/report.c gpm-1.20.1/src/report.c --- gpm-1.20.1.orig/src/report.c 2005-02-01 15:16:51.000000000 +0100 +++ gpm-1.20.1/src/report.c 2005-02-01 15:34:00.000000000 +0100 @@ -70,7 +70,6 @@ void gpm_report(int line, char *file, int stat, char *text, ... ) { - FILE *console = NULL; va_list ap; va_start(ap,text); @@ -80,23 +79,9 @@ case GPM_RUN_STARTUP: switch(stat) { case GPM_STAT_INFO: -#ifdef HAVE_VSYSLOG - syslog(LOG_INFO | LOG_USER, GPM_STRING_INFO); - vsyslog(LOG_INFO | LOG_USER, text, ap); -#endif - fprintf(stderr,GPM_STRING_INFO); - vfprintf(stderr,text,ap); - fprintf(stderr,"\n"); break; case GPM_STAT_WARN: -#ifdef HAVE_VSYSLOG - syslog(LOG_DAEMON | LOG_WARNING, GPM_STRING_WARN); - vsyslog(LOG_DAEMON | LOG_WARNING, text, ap); -#endif - fprintf(stderr,GPM_STRING_WARN); - vfprintf(stderr,text,ap); - fprintf(stderr,"\n"); break; case GPM_STAT_ERR: @@ -104,9 +89,6 @@ syslog(LOG_DAEMON | LOG_ERR, GPM_STRING_ERR); vsyslog(LOG_DAEMON | LOG_ERR, text, ap); #endif - fprintf(stderr,GPM_STRING_ERR); - vfprintf(stderr,text,ap); - fprintf(stderr,"\n"); break; case GPM_STAT_OOPS: @@ -114,10 +96,6 @@ syslog(LOG_DAEMON | LOG_ERR, GPM_STRING_OOPS); vsyslog(LOG_DAEMON | LOG_ERR, text, ap); #endif - fprintf(stderr,GPM_STRING_OOPS); - vfprintf(stderr,text,ap); - fprintf(stderr,"\n"); - exit(1); /* we should have a oops()-function,but this works,too*/ break; } @@ -127,23 +105,9 @@ case GPM_RUN_DAEMON: switch(stat) { case GPM_STAT_INFO: -#ifdef HAVE_VSYSLOG - syslog(LOG_INFO | LOG_USER, GPM_STRING_INFO); - vsyslog(LOG_INFO | LOG_USER, text, ap); -#endif break; case GPM_STAT_WARN: -#ifdef HAVE_VSYSLOG - syslog(LOG_DAEMON | LOG_WARNING, GPM_STRING_WARN); - vsyslog(LOG_DAEMON | LOG_WARNING, text, ap); -#endif - if((console = fopen(GPM_SYS_CONSOLE,"a")) != NULL) { - fprintf(console,GPM_STRING_WARN); - vfprintf(console,text,ap); - fprintf(console,"\n"); - fclose(console); - } break; case GPM_STAT_ERR: @@ -151,19 +115,6 @@ syslog(LOG_DAEMON | LOG_ERR, GPM_STRING_ERR); vsyslog(LOG_DAEMON | LOG_ERR, text, ap); #endif - if((console = fopen(GPM_SYS_CONSOLE,"a")) != NULL) { - fprintf(console,GPM_STRING_ERR); - vfprintf(console,text,ap); - fprintf(console,"\n"); - fclose(console); - } - - if((console = fopen(option.consolename,"a")) != NULL) { - fprintf(console,GPM_STRING_ERR); - vfprintf(console,text,ap); - fprintf(console,"\n"); - fclose(console); - } break; case GPM_STAT_OOPS: @@ -171,37 +122,10 @@ syslog(LOG_DAEMON | LOG_ERR, GPM_STRING_OOPS); vsyslog(LOG_DAEMON | LOG_ERR, text, ap); #endif - fprintf(stderr,GPM_STRING_OOPS); - vfprintf(stderr,text,ap); - fprintf(stderr,"\n"); - _exit(1); /* we are the fork()-child */ break; } break; /* running gpm */ - - /******************** DEBUGGING and CLIENT *****************/ - case GPM_RUN_DEBUG: - switch(stat) { - case GPM_STAT_INFO: - console = stdout; - fprintf(console,GPM_STRING_INFO); break; - case GPM_STAT_WARN: - console = stderr; - fprintf(console,GPM_STRING_WARN); break; - case GPM_STAT_ERR: - console = stderr; - fprintf(console,GPM_STRING_ERR); break; - case GPM_STAT_DEBUG: - console = stderr; - fprintf(console,GPM_STRING_DEBUG); break; - case GPM_STAT_OOPS: - console = stderr; - fprintf(console,GPM_STRING_OOPS); break; - } - - vfprintf(console,text,ap); - fprintf(console,"\n"); if(stat == GPM_STAT_OOPS) exit(1);