diff options
author | Roger Dingledine <arma@torproject.org> | 2005-01-01 07:54:01 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-01-01 07:54:01 +0000 |
commit | a4ad47df86eef0dbb39c1e57cb692cbcd9e28a82 (patch) | |
tree | 5047ac0144a7e9c810a5b6b2eb1181473231c1c6 | |
parent | 35d5a5b7128da6be902364bcc5859300ffee0f9f (diff) | |
download | tor-a4ad47df86eef0dbb39c1e57cb692cbcd9e28a82.tar.gz tor-a4ad47df86eef0dbb39c1e57cb692cbcd9e28a82.zip |
Fix a double-mark-for-close bug, where we were finding a conn
for a cell even if that conn is already marked for close.
Don't back-port to 0.0.9.x, since this fix could have weird implications.
svn:r3235
-rw-r--r-- | src/or/relay.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 46c23d7de4..8e6f623b01 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -349,7 +349,7 @@ relay_lookup_conn(circuit_t *circ, cell_t *cell, int cell_direction) */ for (tmpconn = circ->n_streams; tmpconn; tmpconn=tmpconn->next_stream) { - if (rh.stream_id == tmpconn->stream_id) { + if (rh.stream_id == tmpconn->stream_id && !tmpconn->marked_for_close) { log_fn(LOG_DEBUG,"found conn for stream %d.", rh.stream_id); if (cell_direction == CELL_DIRECTION_OUT || connection_edge_is_rendezvous_stream(tmpconn)) @@ -357,13 +357,13 @@ relay_lookup_conn(circuit_t *circ, cell_t *cell, int cell_direction) } } for (tmpconn = circ->p_streams; tmpconn; tmpconn=tmpconn->next_stream) { - if (rh.stream_id == tmpconn->stream_id) { + if (rh.stream_id == tmpconn->stream_id && !tmpconn->marked_for_close) { log_fn(LOG_DEBUG,"found conn for stream %d.", rh.stream_id); return tmpconn; } } for (tmpconn = circ->resolving_streams; tmpconn; tmpconn=tmpconn->next_stream) { - if (rh.stream_id == tmpconn->stream_id) { + if (rh.stream_id == tmpconn->stream_id && !tmpconn->marked_for_close) { log_fn(LOG_DEBUG,"found conn for stream %d.", rh.stream_id); return tmpconn; } |