summaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-03-23 02:52:55 +0000
committerRoger Dingledine <arma@torproject.org>2005-03-23 02:52:55 +0000
commit7373042a7b5349bd45b3ce7c6b99a694330a65ad (patch)
treec47b37426c26c9ddbc5c6d5e38171b7a9a8c5ea0 /src/or/relay.c
parenta523439cbc131facdcde10f6c25edb1a8f995724 (diff)
downloadtor-7373042a7b5349bd45b3ce7c6b99a694330a65ad.tar.gz
tor-7373042a7b5349bd45b3ce7c6b99a694330a65ad.zip
fix assert triggers (bugs 109 and 96), and put in some
debugging logs to notice future repeat bugs. svn:r3826
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index 5651fd35e1..399587dcd2 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -407,6 +407,12 @@ int connection_edge_send_command(connection_t *fromconn, circuit_t *circ,
relay_header_t rh;
int cell_direction;
+ if (fromconn->marked_for_close) {
+ log_fn(LOG_WARN,"Bug: called on conn that's already marked for close at %s:%d.",
+ fromconn->marked_for_close_file, fromconn->marked_for_close);
+ return 0;
+ }
+
if (!circ) {
log_fn(LOG_WARN,"no circ. Closing conn.");
tor_assert(fromconn);
@@ -974,6 +980,11 @@ int connection_edge_package_raw_inbuf(connection_t *conn, int package_partial) {
tor_assert(conn);
tor_assert(!connection_speaks_cells(conn));
+ if (conn->marked_for_close) {
+ log_fn(LOG_WARN,"Bug: called on conn that's already marked for close at %s:%d.",
+ conn->marked_for_close_file, conn->marked_for_close);
+ return 0;
+ }
repeat_connection_edge_package_raw_inbuf: