diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-22 20:08:07 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-22 20:08:07 +0000 |
commit | 805c9e36736211b8248c6432277dbf65bc92163d (patch) | |
tree | 4fc7ac264975a136216e647e9df231491da45340 | |
parent | 604be3ae448c8e3d79ddbc80bbc483365110d272 (diff) | |
download | tor-805c9e36736211b8248c6432277dbf65bc92163d.tar.gz tor-805c9e36736211b8248c6432277dbf65bc92163d.zip |
Absolutely never call close_temp_logs while validating log options.
svn:r2934
-rw-r--r-- | src/or/config.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/config.c b/src/or/config.c index cc5760f309..5a7d7158ec 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1785,13 +1785,15 @@ config_init_logs(or_options_t *options, int validate_only) ok = 0; goto cleanup; } if (!strcasecmp(smartlist_get(elts,1), "stdout")) { - if (!validate_only) + if (!validate_only) { add_stream_log(levelMin, levelMax, "<stdout>", stdout); - close_temp_logs(); + close_temp_logs(); + } } else if (!strcasecmp(smartlist_get(elts,1), "stderr")) { - if (!validate_only) + if (!validate_only) { add_stream_log(levelMin, levelMax, "<stderr>", stderr); - close_temp_logs(); + close_temp_logs(); + } } else if (!strcasecmp(smartlist_get(elts,1), "syslog")) { #ifdef HAVE_SYSLOG_H if (!validate_only) |