[or-cvs] tell the controller about new .onion streams too.

arma at seul.org arma at seul.org
Tue Dec 6 23:43:54 UTC 2005


Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	connection_edge.c 
Log Message:
tell the controller about new .onion streams too.


Index: connection_edge.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.372
retrieving revision 1.373
diff -u -d -r1.372 -r1.373
--- connection_edge.c	6 Dec 2005 21:03:48 -0000	1.372
+++ connection_edge.c	6 Dec 2005 23:43:52 -0000	1.373
@@ -1116,9 +1116,7 @@
       info(LD_REND, "Unknown descriptor %s. Fetching.",
              safe_str(conn->rend_query));
       rend_client_refetch_renddesc(conn->rend_query);
-      return 0;
-    }
-    if (r>0) {
+    } else { /* r > 0 */
 #define NUM_SECONDS_BEFORE_REFETCH (60*15)
       if (time(NULL) - entry->received < NUM_SECONDS_BEFORE_REFETCH) {
         conn->state = AP_CONN_STATE_CIRCUIT_WAIT;
@@ -1127,15 +1125,15 @@
           connection_mark_unattached_ap(conn, END_STREAM_REASON_CANT_ATTACH);
           return -1;
         }
-        return 0;
       } else {
         conn->state = AP_CONN_STATE_RENDDESC_WAIT;
         info(LD_REND, "Stale descriptor %s. Refetching.",
              safe_str(conn->rend_query));
         rend_client_refetch_renddesc(conn->rend_query);
-        return 0;
       }
     }
+    control_event_stream_status(conn, STREAM_EVENT_NEW);
+    return 0;
   }
   return 0; /* unreached but keeps the compiler happy */
 }



More information about the tor-commits mailing list