projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
* techdoc/delivery-list.txt: added (syntax for delivery lists)
[citadel.git]
/
citadel
/
logging.c
diff --git
a/citadel/logging.c
b/citadel/logging.c
index 0f5eef2116fd2f6fe7e4c60521225d9e172eb9af..39a66c147f38ca688b0c83a6a45f6189bc7b5f71 100644
(file)
--- a/
citadel/logging.c
+++ b/
citadel/logging.c
@@
-25,6
+25,8
@@
void rec_log(unsigned int lrtype, char *name) {
time(&now);
fp = fopen("citadel.log", "a");
- fprintf(fp, "%ld|%u|%s\n", (long)now, lrtype, name);
- fclose(fp);
+ if (fp != NULL) {
+ fprintf(fp, "%ld|%u|%s\n", (long)now, lrtype, name);
+ fclose(fp);
}
+}