Procházet zdrojové kódy

finally find and possibly fix the circuit_deliver_relay_cell warn bug

svn:r827
Roger Dingledine před 20 roky
rodič
revize
a18ced652b
2 změnil soubory, kde provedl 5 přidání a 4 odebrání
  1. 4 3
      src/or/circuit.c
  2. 1 1
      src/or/config.c

+ 4 - 3
src/or/circuit.c

@@ -857,9 +857,10 @@ int circuit_extend(cell_t *cell, circuit_t *circ) {
      */
     struct in_addr in;
     in.s_addr = htonl(circ->n_addr);
-    log_fn(LOG_WARN,"Next router (%s:%d) not connected. Closing.", inet_ntoa(in), circ->n_port);
-    /* XXX later we should fail more gracefully here, like with a 'truncated' */
-    return -1;
+    log_fn(LOG_INFO,"Next router (%s:%d) not connected. Closing.", inet_ntoa(in), circ->n_port);
+    connection_edge_send_command(NULL, circ, RELAY_COMMAND_TRUNCATED,
+                                 NULL, 0, NULL);
+    return 0;
   }
 
   circ->n_addr = n_conn->addr; /* these are different if we found a twin instead */

+ 1 - 1
src/or/config.c

@@ -265,7 +265,7 @@ void init_options(or_options_t *options) {
   options->MaxConn = 900;
   options->DirFetchPostPeriod = 600;
   options->KeepalivePeriod = 300;
-  options->MaxOnionsPending = 10;
+  options->MaxOnionsPending = 100;
   options->NewCircuitPeriod = 60; /* once a minute */
   options->TotalBandwidth = 800000; /* at most 800kB/s total sustained incoming */
   options->NumCpus = 1;