projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
updates.
[silc.git]
/
lib
/
silcutil
/
silclog.c
diff --git
a/lib/silcutil/silclog.c
b/lib/silcutil/silclog.c
index 13d186476cafa489e0d281358b22c0d8259dc2d5..91b254d508b90ec63960eec19d7ad3c8e2c96ae5 100644
(file)
--- a/
lib/silcutil/silclog.c
+++ b/
lib/silcutil/silclog.c
@@
-107,6
+107,8
@@
void silc_log_output(const char *filename, uint32 maxsize,
/* Purge? */
if (filelen >= maxsize)
unlink(filename);
+
+ fclose(fp);
}
}
@@
-126,7
+128,8
@@
void silc_log_output(const char *filename, uint32 maxsize,
fprintf(fp, "[%s] [%s] %s\n", silc_get_time(), np->name, string);
fflush(fp);
- fclose(fp);
+ if (fp != stderr)
+ fclose(fp);
silc_free(string);
}