Parcourir la source

Fix issues found by arma in review.

Mike Perry il y a 15 ans
Parent
commit
63be2df84f
3 fichiers modifiés avec 2 ajouts et 7 suppressions
  1. 1 2
      src/or/circuitbuild.c
  2. 0 4
      src/or/circuituse.c
  3. 1 1
      src/or/config.c

+ 1 - 2
src/or/circuitbuild.c

@@ -306,8 +306,7 @@ circuit_build_times_parse_state(circuit_build_times_t *cbt,
   int tot_values = 0, N = 0;
   config_line_t *line;
   int i;
-  msg = NULL; /* XXX is this a bug? should be *msg, or we'll seg fault
-               * if we try to set it */
+  *msg = NULL;
   circuit_build_times_init(cbt);
 
   /* We don't support decreasing the table size yet */

+ 0 - 4
src/or/circuituse.c

@@ -858,10 +858,8 @@ circuit_build_failed(origin_circuit_t *circ)
       break;
     case CIRCUIT_PURPOSE_C_INTRODUCING:
       /* at Alice, connecting to intro point */
-      circuit_increment_failure_count();
       /* Don't increment failure count, since Bob may have picked
        * the introduction point maliciously */
-      /* XXX Mike, you didn't read my comment above! :) -RD */
       /* Alice will pick a new intro point when this one dies, if
        * the stream in question still cares. No need to act here. */
       break;
@@ -873,10 +871,8 @@ circuit_build_failed(origin_circuit_t *circ)
       break;
     case CIRCUIT_PURPOSE_S_CONNECT_REND:
       /* at Bob, connecting to rend point */
-      circuit_increment_failure_count();
       /* Don't increment failure count, since Alice may have picked
        * the rendezvous point maliciously */
-      /* XXX Mike, you didn't read my comment above! :) -RD */
       log_info(LD_REND,
                "Couldn't connect to Alice's chosen rend point %s "
                "(%s hop failed).",

+ 1 - 1
src/or/config.c

@@ -409,7 +409,7 @@ static config_var_t _state_vars[] = {
   V(LastRotatedOnionKey,              ISOTIME,  NULL),
   V(LastWritten,                      ISOTIME,  NULL),
 
-  V("TotalBuildTimes",                UINT,     NULL),
+  V(TotalBuildTimes,                  UINT,     NULL),
   VAR("CircuitBuildTimeBin",          LINELIST_S, BuildtimeHistogram, NULL),
   VAR("BuildtimeHistogram",           LINELIST_V, BuildtimeHistogram, NULL),