Browse Source

set the circ windows on the middle hop of the rend circs

svn:r1511
Roger Dingledine 21 years ago
parent
commit
d473cf7ee9
3 changed files with 13 additions and 1 deletions
  1. 1 1
      src/or/circuit.c
  2. 6 0
      src/or/rendclient.c
  3. 6 0
      src/or/rendservice.c

+ 1 - 1
src/or/circuit.c

@@ -945,7 +945,7 @@ void circuit_log_path(int severity, circuit_t *circ) {
                router->nickname, states[hop->state]);
     } else {
       if(circ->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) {
-        snprintf(s, sizeof(buf) - (s - buf), "(rend join)");
+        snprintf(s, sizeof(buf) - (s - buf), "(rendjoin hop)");
       } else {
         snprintf(s, sizeof(buf) - (s - buf), "UNKNOWN ");
       }

+ 6 - 0
src/or/rendclient.c

@@ -210,6 +210,12 @@ rend_client_receive_rendezvous(circuit_t *circ, const char *request, int request
   /* All is well. Extend the circuit. */
   circ->purpose = CIRCUIT_PURPOSE_C_REND_JOINED;
   hop->state = CPATH_STATE_OPEN;
+  /* set the windows to default. these are the windows
+   * that alice thinks bob has.
+   */
+  hop->package_window = CIRCWINDOW_START;
+  hop->deliver_window = CIRCWINDOW_START;
+
   onion_append_to_cpath(&circ->cpath, hop);
   circ->build_state->pending_final_cpath = NULL; /* prevent double-free */
 

+ 6 - 0
src/or/rendservice.c

@@ -593,6 +593,12 @@ rend_service_rendezvous_is_ready(circuit_t *circuit)
 
   /* Append the cpath entry. */
   hop->state = CPATH_STATE_OPEN;
+  /* set the windows to default. these are the windows
+   * that bob thinks alice has.
+   */
+  hop->package_window = CIRCWINDOW_START;
+  hop->deliver_window = CIRCWINDOW_START;
+
   onion_append_to_cpath(&circuit->cpath, hop);
   circuit->build_state->pending_final_cpath = NULL; /* prevent double-free */