Make sure the event handlers initialize and register themselves.

This commit is contained in:
Wilco Baan Hofman 2012-08-06 01:11:03 +02:00
parent fb4832fb88
commit 3fb1474113
11 changed files with 221 additions and 154 deletions

View file

@ -33,8 +33,11 @@ STATUS debug(int loglevel, const char *location, const char *function, ...)
}
logfile = fopen(conf->log_file, "a");
if (logfile == NULL && conf->foreground) {
fprintf(stderr, "Error opening log file: %s\n", strerror(errno));
if (logfile == NULL) {
if (conf->foreground) {
fprintf(stderr, "Error opening log file: %s\n", strerror(errno));
}
return ST_GENERAL_FAILURE;
}
time(&rawtime);