소스 검색

mark_logs_temp() before init'ing new ones.
we were seeing double, triple, etc each time we setconf'ed.


svn:r2738

Roger Dingledine 21 년 전
부모
커밋
6a504efdd3
2개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      src/or/config.c
  2. 0 1
      src/or/main.c

+ 2 - 2
src/or/config.c

@@ -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. */

+ 0 - 1
src/or/main.c

@@ -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) {