[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] make the conn->package_window bug go away.
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
connection.c
Log Message:
make the conn->package_window bug go away.
not resolved, but at least the servers will stop crashing.
Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- connection.c 25 Aug 2003 20:57:23 -0000 1.77
+++ connection.c 25 Aug 2003 21:43:51 -0000 1.78
@@ -564,7 +564,6 @@
assert(!connection_speaks_cells(conn));
repeat_connection_package_raw_inbuf:
- assert(conn->package_window > 0);
circ = circuit_get_by_conn(conn);
if(!circ) {
@@ -574,6 +573,12 @@
if(circuit_consider_stop_edge_reading(circ, conn->type, conn->cpath_layer))
return 0;
+
+ if(conn->package_window <= 0) {
+ log_fn(LOG_ERR,"called with package_window 0. Tell Roger.");
+ connection_stop_reading(conn);
+ return 0;
+ }
amount_to_process = conn->inbuf_datalen;