remove duplicate packagewindow-checking code,

see if we can induce that segfault i just saw more often


svn:r407
This commit is contained in:
Roger Dingledine 2003-08-23 10:06:46 +00:00
parent bb1584274c
commit 33b0569fba

View File

@ -620,13 +620,14 @@ repeat_connection_package_raw_inbuf:
} }
assert(conn->package_window > 0); assert(conn->package_window > 0);
if(--conn->package_window <= 0) { /* is it 0 after decrement? */ conn->package_window--;
connection_stop_reading(conn); // if(--conn->package_window <= 0) { /* is it 0 after decrement? */
log_fn(LOG_DEBUG,"conn->package_window reached 0."); // connection_stop_reading(conn);
circuit_consider_stop_edge_reading(circ, conn->type, conn->cpath_layer); // log_fn(LOG_DEBUG,"conn->package_window reached 0.");
return 0; /* don't process the inbuf any more */ // circuit_consider_stop_edge_reading(circ, conn->type, conn->cpath_layer);
} // return 0; /* don't process the inbuf any more */
log_fn(LOG_DEBUG,"conn->package_window is %d",conn->package_window); // }
log_fn(LOG_DEBUG,"conn->package_window is now %d",conn->package_window);
/* handle more if there's more, or return 0 if there isn't */ /* handle more if there's more, or return 0 if there isn't */
goto repeat_connection_package_raw_inbuf; goto repeat_connection_package_raw_inbuf;