summaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-02-05 17:42:40 +0000
committerNick Mathewson <nickm@torproject.org>2007-02-05 17:42:40 +0000
commit03ef2156c93523cb548ea20b41e554b939964c29 (patch)
tree8b0c0fe57fa44ef512279fa895dfda73fadcf0be /src/or/connection_or.c
parent6149ab01f86ddc406b2232292d693a1702122c89 (diff)
downloadtor-03ef2156c93523cb548ea20b41e554b939964c29.tar.gz
tor-03ef2156c93523cb548ea20b41e554b939964c29.zip
r11637@catbus: nickm | 2007-02-05 12:41:51 -0500
Fix an XXXX012, and make circuits_pending_or_conns a static variable. In addition to cleaning up the code, this may also resolve Bug 386 if Roger has the right intuition there. svn:r9482
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 420d6b9fa3..b234e906a7 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -779,37 +779,6 @@ connection_or_send_destroy(uint16_t circ_id, or_connection_t *conn, int reason)
return 0;
}
-/* XXXX012 This global is getting _too_ global. -NM */
-extern smartlist_t *circuits_pending_or_conns;
-
-/** Count number of pending circs on an or_conn */
-int
-connection_or_count_pending_circs(or_connection_t *or_conn)
-{
- int cnt = 0;
-
- if (!circuits_pending_or_conns)
- return 0;
-
- tor_assert(or_conn);
-
- SMARTLIST_FOREACH(circuits_pending_or_conns, circuit_t *, circ,
- {
- if (circ->marked_for_close)
- continue;
- tor_assert(circ->state == CIRCUIT_STATE_OR_WAIT);
- if (!circ->n_conn &&
- !memcmp(or_conn->identity_digest, circ->n_conn_id_digest,
- DIGEST_LEN)) {
- cnt++;
- }
- });
-
- log_debug(LD_CIRC,"or_conn to %s, %d pending circs",
- or_conn->nickname ? or_conn->nickname : "NULL", cnt);
- return cnt;
-}
-
/** DOCDOC */
#define BUF_FULLNESS_THRESHOLD (128*1024)
/** DOCDOC */