[or-cvs] make it work (heh)

Roger Dingledine arma at seul.org
Fri Apr 11 22:28:53 UTC 2003


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home/arma/work/onion/cvs/src/or

Modified Files:
	connection_edge.c or.h 
Log Message:
make it work (heh)


Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- connection_edge.c	11 Apr 2003 22:11:11 -0000	1.1
+++ connection_edge.c	11 Apr 2003 22:28:51 -0000	1.2
@@ -106,7 +106,12 @@
 
   circuit_consider_sending_sendme(circ, edge_type);
 
-  for(conn = circ->p_conn; conn && conn->topic_id != topic_id; conn = conn->next_topic) ;
+  if(edge_type == EDGE_AP)
+    conn = circ->p_conn;
+  else
+    conn = circ->n_conn;
+
+  for( ; conn && conn->topic_id != topic_id; conn = conn->next_topic) ;
 
   /* now conn is either NULL, in which case we don't recognize the topic_id, or
    * it is set, in which case cell is talking about this conn.
@@ -247,7 +252,7 @@
       if(connection_wants_to_flush(conn)) /* in case there are any queued data cells */
         connection_start_writing(conn);
       return
-        connection_exit_send_connected(conn) || /* deliver a 'connected' data cell back through the circuit. */
+        connection_edge_send_command(conn, circuit_get_by_conn(conn), TOPIC_COMMAND_CONNECTED) || /* deliver a 'connected' data cell back through the circuit. */
         connection_process_inbuf(conn); /* in case the server has written anything */
     case AP_CONN_STATE_OPEN:
     case EXIT_CONN_STATE_OPEN:

Index: or.h
===================================================================
RCS file: /home/or/cvsroot/src/or/or.h,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- or.h	11 Apr 2003 22:11:11 -0000	1.60
+++ or.h	11 Apr 2003 22:28:51 -0000	1.61
@@ -624,7 +624,7 @@
 /********************************* connection_edge.c ***************************/
 
 int connection_edge_process_inbuf(connection_t *conn);
-int connection_edge_send_command(connection_t *conn, int topic_command);
+int connection_edge_send_command(connection_t *conn, circuit_t *circ, int topic_command);
 int connection_edge_process_data_cell(cell_t *cell, circuit_t *circ, int edge_type);
 int connection_edge_finished_flushing(connection_t *conn);
 



More information about the tor-commits mailing list