[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] commencing the bughunt
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
circuit.c
Log Message:
commencing the bughunt
Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- circuit.c 12 Nov 2003 19:34:34 -0000 1.90
+++ circuit.c 14 Nov 2003 07:15:52 -0000 1.91
@@ -241,12 +241,18 @@
if(cell_direction == CELL_DIRECTION_OUT) {
++stats_n_relay_cells_delivered;
log_fn(LOG_DEBUG,"Sending to exit.");
- return connection_edge_process_relay_cell(cell, circ, conn, EDGE_EXIT, NULL);
+ if (connection_edge_process_relay_cell(cell, circ, conn, EDGE_EXIT, NULL) < 0) {
+ log_fn(LOG_WARN,"connection_edge_process_relay_cell (at exit) failed.");
+ return -1;
+ }
}
if(cell_direction == CELL_DIRECTION_IN) {
++stats_n_relay_cells_delivered;
log_fn(LOG_DEBUG,"Sending to AP.");
- return connection_edge_process_relay_cell(cell, circ, conn, EDGE_AP, layer_hint);
+ if (connection_edge_process_relay_cell(cell, circ, conn, EDGE_AP, layer_hint) < 0) {
+ log_fn(LOG_WARN,"connection_edge_process_relay_cell (at AP) failed.");
+ return -1;
+ }
}
}
@@ -257,8 +263,9 @@
else
conn = circ->p_conn;
- if(!conn) { //|| !connection_speaks_cells(conn)) {
- log_fn(LOG_INFO,"Didn't recognize cell (%d), but circ stops here! Dropping.", *(int *)(cell->payload+1));
+ if(!conn) {
+ log_fn(LOG_INFO,"Didn't recognize cell (%d), but circ stops here! Dropping.",
+ *(int *)(cell->payload+1));
return 0;
}
@@ -459,6 +466,7 @@
log_fn(LOG_DEBUG,"deliver_window %d, Queueing sendme forward.", layer_hint->deliver_window);
layer_hint->deliver_window += CIRCWINDOW_INCREMENT;
if(circuit_deliver_relay_cell(&cell, circ, CELL_DIRECTION_OUT, layer_hint) < 0) {
+ log_fn(LOG_WARN,"At AP: circuit_deliver_relay_cell failed.");
return -1;
}
}
@@ -468,6 +476,7 @@
log_fn(LOG_DEBUG,"deliver_window %d, Queueing sendme back.", circ->deliver_window);
circ->deliver_window += CIRCWINDOW_INCREMENT;
if(circuit_deliver_relay_cell(&cell, circ, CELL_DIRECTION_IN, layer_hint) < 0) {
+ log_fn(LOG_WARN,"At exit: circuit_deliver_relay_cell failed.");
return -1;
}
}