瀏覽代碼

fix subtle bug that was causing logs to not show anything

svn:r2695
Roger Dingledine 22 年之前
父節點
當前提交
e2e6d19e76
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/or/config.c

+ 2 - 2
src/or/config.c

@@ -1395,10 +1395,10 @@ config_init_logs(or_options_t *options)
       log_fn(LOG_WARN, "Bad syntax on Log option 'Log %s'", opt->value);
       log_fn(LOG_WARN, "Bad syntax on Log option 'Log %s'", opt->value);
       ok = 0; goto cleanup;
       ok = 0; goto cleanup;
     }
     }
-    if (parse_log_severity_range(smartlist_get(elts,0), &levelMin, &levelMin)) {
+    if (parse_log_severity_range(smartlist_get(elts,0), &levelMin, &levelMax)) {
       ok = 0; goto cleanup;
       ok = 0; goto cleanup;
     }
     }
-    if (smartlist_len(elts) < 2) {
+    if (smartlist_len(elts) < 2) { /* only loglevels were provided */
       add_stream_log(levelMin, levelMax, "<stdout>", stdout);
       add_stream_log(levelMin, levelMax, "<stdout>", stdout);
       goto cleanup;
       goto cleanup;
     }
     }