diff options
author | Michael Adam <obnox@samba.org> | 2009-12-23 00:17:37 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-12-23 00:31:55 +0100 |
commit | c4b9454807efa2e1717010f87c2c226ea785f1e5 (patch) | |
tree | e42be960b79f2b3afb7e1b5bfcb84f472ab55bdb /src | |
parent | f3c8424515c14cecd042af15881c63e5504969de (diff) | |
download | tinyproxy-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.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; } /* |