/*
- * Everything which needs some logging...
* $Id$
+ *
+ * Everything which needs some logging...
+ *
*/
#include "sysdep.h"
#include <ctype.h>
#include <string.h>
#include <errno.h>
-#ifdef HAVE_PTHREAD_H
-#include <pthread.h>
-#endif
#include <syslog.h>
#include "citadel.h"
#include "server.h"
time(&now);
fp = fopen("citadel.log", "a");
- fprintf(fp, "%ld|%u|%s\n", now, lrtype, name);
- fclose(fp);
+ if (fp != NULL) {
+ fprintf(fp, "%ld|%u|%s\n", (long)now, lrtype, name);
+ fclose(fp);
}
+}