diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-10-02 22:40:01 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-10-02 22:40:01 -0400 |
commit | 566645b5edb25aec55e6dffaf6f522456f661a9e (patch) | |
tree | 75b48f428e709db313639fe004244812be3dc1d1 /src/or/channel.c | |
parent | e65b54ec75e3c9e9ada33c8f3ee868d1bea167f5 (diff) | |
parent | 0bec65277abed5567458e94c05c2b94f1b84e460 (diff) | |
download | tor-566645b5edb25aec55e6dffaf6f522456f661a9e.tar.gz tor-566645b5edb25aec55e6dffaf6f522456f661a9e.zip |
Merge remote-tracking branch 'origin/maint-0.2.4'
Diffstat (limited to 'src/or/channel.c')
-rw-r--r-- | src/or/channel.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/channel.c b/src/or/channel.c index afe28bf5e5..a345bab20c 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -745,6 +745,9 @@ channel_init(channel_t *chan) /* Timestamp it */ channel_timestamp_created(chan); + + /* It hasn't been open yet. */ + chan->has_been_open = 0; } /** @@ -1297,7 +1300,8 @@ channel_closed(channel_t *chan) /* Inform any pending (not attached) circs that they should * give up. */ - circuit_n_chan_done(chan, 0); + if (! chan->has_been_open) + circuit_n_chan_done(chan, 0); /* Now close all the attached circuits on it. */ circuit_unlink_all_from_channel(chan, END_CIRC_REASON_CHANNEL_CLOSED); @@ -1945,6 +1949,7 @@ channel_change_state(channel_t *chan, channel_state_t to_state) /* Tell circuits if we opened and stuff */ if (to_state == CHANNEL_STATE_OPEN) { channel_do_open_actions(chan); + chan->has_been_open = 1; /* Check for queued cells to process */ if (! TOR_SIMPLEQ_EMPTY(&chan->incoming_queue)) |