]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
mark_logs_temp() before init'ing new ones.
authorRoger Dingledine <arma@torproject.org>
Tue, 9 Nov 2004 08:01:39 +0000 (08:01 +0000)
committerRoger Dingledine <arma@torproject.org>
Tue, 9 Nov 2004 08:01:39 +0000 (08:01 +0000)
we were seeing double, triple, etc each time we setconf'ed.

svn:r2738

src/or/config.c
src/or/main.c

index 02756d0754a26fe326c91540cc3e33677fd6fc66..12437317ee61b155bc93ab1d1e26437d09eed09b 100644 (file)
@@ -256,8 +256,8 @@ options_act(void) {
   if (set_max_file_descriptors(options->MaxConn) < 0)
     return -1;
 
-  /* Configure the log(s) */
-  if (config_init_logs(options)<0)
+  mark_logs_temp(); /* Close current logs once new logs are open. */
+  if (config_init_logs(options)<0) /* Configure the log(s) */
     return -1;
   /* Close the temporary log we used while starting up, if it isn't already
    * gone. */
index e549a89d3e80648fcc0d4993590bca0a24dcec3c..0f0da41eeaf4aecd2c93e36d253160b7a6eb8806 100644 (file)
@@ -696,7 +696,6 @@ static int do_hup(void) {
 
   log_fn(LOG_NOTICE,"Received sighup. Reloading config.");
   has_completed_circuit=0;
-  mark_logs_temp(); /* Close current logs once new logs are open. */
   /* first, reload config variables, in case they've changed */
   /* no need to provide argc/v, they've been cached inside init_from_config */
   if (init_from_config(0, NULL) < 0) {