summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-08-25 21:43:51 +0000
committerRoger Dingledine <arma@torproject.org>2003-08-25 21:43:51 +0000
commit90f22933e7ae3b7da2564444768889e846553662 (patch)
treec461420017922c1a25038a869d73ce5eded98b5e /src
parent14c8bc598b971d6ffe95c9cff20e6d22c13eb7ed (diff)
downloadtor-90f22933e7ae3b7da2564444768889e846553662.tar.gz
tor-90f22933e7ae3b7da2564444768889e846553662.zip
make the conn->package_window bug go away.
not resolved, but at least the servers will stop crashing. svn:r416
Diffstat (limited to 'src')
-rw-r--r--src/or/connection.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index e781ff24c1..cc39119a8b 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -564,7 +564,6 @@ int connection_package_raw_inbuf(connection_t *conn) {
assert(!connection_speaks_cells(conn));
repeat_connection_package_raw_inbuf:
- assert(conn->package_window > 0);
circ = circuit_get_by_conn(conn);
if(!circ) {
@@ -575,6 +574,12 @@ repeat_connection_package_raw_inbuf:
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;
if(!amount_to_process)