aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-04-26 18:52:16 +0000
committerRoger Dingledine <arma@torproject.org>2005-04-26 18:52:16 +0000
commit509405a5f7643f94933ae7feb0a2788a73abd801 (patch)
tree7732760a74a902c247f746ebc52ccb97e54dc329 /src/or/connection.c
parent5e86e87124e643108c827366daac878e708d935d (diff)
downloadtor-509405a5f7643f94933ae7feb0a2788a73abd801.tar
tor-509405a5f7643f94933ae7feb0a2788a73abd801.tar.gz
clean up this TOR_FRAGILE business
svn:r4116
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index c19c9b9dd..a3ee4554e 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -270,9 +270,7 @@ void connection_about_to_close_connection(connection_t *conn)
if (CONN_IS_EDGE(conn)) {
if (!conn->has_sent_end) {
log_fn(LOG_WARN,"Harmless bug: Edge connection (marked at %s:%d) hasn't sent end yet?", conn->marked_for_close_file, conn->marked_for_close);
-#ifdef TOR_FRAGILE
- tor_assert(0);
-#endif
+ tor_fragile_assert();
}
}
@@ -345,9 +343,7 @@ void connection_close_immediate(connection_t *conn)
assert_connection_ok(conn,0);
if (conn->s < 0) {
log_fn(LOG_WARN,"Bug: Attempt to close already-closed connection.");
-#ifdef TOR_FRAGILE
- tor_assert(0);
-#endif
+ tor_fragile_assert();
return;
}
if (conn->outbuf_flushlen) {
@@ -380,9 +376,7 @@ _connection_mark_for_close(connection_t *conn, int line, const char *file)
log(LOG_WARN, "Duplicate call to connection_mark_for_close at %s:%d"
" (first at %s:%d)", file, line, conn->marked_for_close_file,
conn->marked_for_close);
-#ifdef TOR_FRAGILE
- tor_assert(0);
-#endif
+ tor_fragile_assert();
return;
}
@@ -1572,9 +1566,7 @@ static int connection_process_inbuf(connection_t *conn, int package_partial) {
return connection_control_process_inbuf(conn);
default:
log_fn(LOG_WARN,"Bug: got unexpected conn type %d.", conn->type);
-#ifdef TOR_FRAGILE
- tor_assert(0);
-#endif
+ tor_fragile_assert();
return -1;
}
}
@@ -1607,9 +1599,7 @@ static int connection_finished_flushing(connection_t *conn) {
return connection_control_finished_flushing(conn);
default:
log_fn(LOG_WARN,"Bug: got unexpected conn type %d.", conn->type);
-#ifdef TOR_FRAGILE
- tor_assert(0);
-#endif
+ tor_fragile_assert();
return -1;
}
}
@@ -1633,9 +1623,7 @@ static int connection_finished_connecting(connection_t *conn)
return connection_dir_finished_connecting(conn);
default:
log_fn(LOG_WARN,"Bug: got unexpected conn type %d.", conn->type);
-#ifdef TOR_FRAGILE
- tor_assert(0);
-#endif
+ tor_fragile_assert();
return -1;
}
}
@@ -1658,9 +1646,7 @@ static int connection_reached_eof(connection_t *conn)
return connection_control_reached_eof(conn);
default:
log_fn(LOG_WARN,"Bug: got unexpected conn type %d.", conn->type);
-#ifdef TOR_FRAGILE
- tor_assert(0);
-#endif
+ tor_fragile_assert();
return -1;
}
}