1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- --- ulogd-2.0.2.orig/src/ulogd.c 2013-03-01 16:45:23.000000000 +0100
- +++ ulogd-2.0.2/src/ulogd.c 2013-11-11 21:27:31.000000000 +0100
- @@ -78,7 +78,7 @@
- static FILE *logfile = NULL; /* logfile pointer */
- static char *ulogd_logfile = NULL;
- static const char *ulogd_configfile = ULOGD_CONFIGFILE;
- -static FILE syslog_dummy;
- +static FILE *syslog_dummy;
-
- static int info_mode = 0;
-
- @@ -420,7 +420,7 @@ void __ulogd_log(int level, char *file,
- if (level < loglevel_ce.u.value)
- return;
-
- - if (logfile == &syslog_dummy) {
- + if (logfile == syslog_dummy) {
- /* FIXME: this omits the 'file' string */
- va_start(ap, format);
- vsyslog(ulogd2syslog_level(level), format, ap);
- @@ -941,7 +941,7 @@ static int logfile_open(const char *name
- logfile = stdout;
- } else if (!strcmp(name, "syslog")) {
- openlog("ulogd", LOG_PID, LOG_DAEMON);
- - logfile = &syslog_dummy;
- + logfile = syslog_dummy;
- } else {
- logfile = fopen(ulogd_logfile, "a");
- if (!logfile) {
- @@ -1070,7 +1070,7 @@ static void sigterm_handler(int signal)
- unload_plugins();
- #endif
-
- - if (logfile != NULL && logfile != stdout && logfile != &syslog_dummy) {
- + if (logfile != NULL && logfile != stdout && logfile != syslog_dummy) {
- fclose(logfile);
- logfile = NULL;
- }
- @@ -1090,7 +1090,7 @@ static void signal_handler(int signal)
- switch (signal) {
- case SIGHUP:
- /* reopen logfile */
- - if (logfile != stdout && logfile != &syslog_dummy) {
- + if (logfile != stdout && logfile != syslog_dummy) {
- fclose(logfile);
- logfile = fopen(ulogd_logfile, "a");
- if (!logfile) {
|