X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/ec1a68c8a2703555659265994f30e8f9156af21c..921592dd1adaed54948c030be0daceb7e0c9d5b7:/src/log.c diff --git a/src/log.c b/src/log.c index b3d8653..d019f0d 100644 --- a/src/log.c +++ b/src/log.c @@ -1,7 +1,7 @@ /* log.c - Diagnostic and error logging * Copyright 2000-2004 srvx Development Team * - * This file is part of srvx. + * This file is part of x3. * * srvx is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -587,6 +587,10 @@ log_module(struct log_type *type, enum log_severity sev, const char *format, ... /* Special behavior before we start full operation */ fprintf(stderr, "%s: %s\n", log_severity_names[sev], msgbuf); } + if (sev == LOG_FATAL) { + assert(0 && "fatal message logged"); + _exit(1); + } } /* audit log searching */ @@ -719,7 +723,8 @@ log_entry_search(struct logSearch *discrim, entry_search_func esf, void *data) unsigned int matched = 0; if (discrim->type) { - struct logEntry *entry, *last; + static volatile struct logEntry *last; + struct logEntry *entry; for (entry = discrim->type->log_oldest, last = NULL; entry;