summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-12-23 00:17:37 +0100
committerMichael Adam <obnox@samba.org>2009-12-23 00:31:55 +0100
commitc4b9454807efa2e1717010f87c2c226ea785f1e5 (patch)
treee42be960b79f2b3afb7e1b5bfcb84f472ab55bdb /src
parentf3c8424515c14cecd042af15881c63e5504969de (diff)
downloadtinyproxy-c4b9454807efa2e1717010f87c2c226ea785f1e5.tar.gz
tinyproxy-c4b9454807efa2e1717010f87c2c226ea785f1e5.zip
log: enhance close_log_file to reset logfile_fd to -1 after closing
Michael
Diffstat (limited to '')
-rw-r--r--src/log.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/log.c b/src/log.c
index c799ff0..c983162 100644
--- a/src/log.c
+++ b/src/log.c
@@ -78,7 +78,12 @@ int open_log_file (const char *log_file_name)
*/
void close_log_file (void)
{
+ if (log_file_fd < 0) {
+ return;
+ }
+
close (log_file_fd);
+ log_file_fd = -1;
}
/*