diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-09-19 16:26:27 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-08 16:47:57 -0500 |
commit | 6aa239df363a9739df96cc4c4660b7aee8a7bef9 (patch) | |
tree | 9a1d8d7eb605aa077c9d7de1f5d57d3ad8cb1cdf | |
parent | cdce221e68489cddad579da0ce804ce2eb5804b3 (diff) | |
download | tor-6aa239df363a9739df96cc4c4660b7aee8a7bef9.tar.gz tor-6aa239df363a9739df96cc4c4660b7aee8a7bef9.zip |
Rename connection_or_remove_from_identity_map
-rw-r--r-- | src/or/connection.c | 4 | ||||
-rw-r--r-- | src/or/connection_or.c | 4 | ||||
-rw-r--r-- | src/or/connection_or.h | 2 | ||||
-rw-r--r-- | src/or/main.c | 2 | ||||
-rw-r--r-- | src/test/test_link_handshake.c | 6 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 2e3df34a5a..f80602155b 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -644,7 +644,7 @@ connection_free_(connection_t *conn) if (conn->type == CONN_TYPE_OR && !tor_digest_is_zero(TO_OR_CONN(conn)->identity_digest)) { log_warn(LD_BUG, "called on OR conn with non-zeroed identity_digest"); - connection_or_remove_from_identity_map(TO_OR_CONN(conn)); + connection_or_clear_identity(TO_OR_CONN(conn)); } if (conn->type == CONN_TYPE_OR || conn->type == CONN_TYPE_EXT_OR) { connection_or_remove_from_ext_or_id_map(TO_OR_CONN(conn)); @@ -675,7 +675,7 @@ connection_free,(connection_t *conn)) } if (connection_speaks_cells(conn)) { if (!tor_digest_is_zero(TO_OR_CONN(conn)->identity_digest)) { - connection_or_remove_from_identity_map(TO_OR_CONN(conn)); + connection_or_clear_identity(TO_OR_CONN(conn)); } } if (conn->type == CONN_TYPE_CONTROL) { diff --git a/src/or/connection_or.c b/src/or/connection_or.c index dbeab26e96..4449d3f3ae 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -84,7 +84,7 @@ static digestmap_t *orconn_ext_or_id_map = NULL; /** Clear clear conn->identity_digest and update other data * structures as appropriate.*/ void -connection_or_remove_from_identity_map(or_connection_t *conn) +connection_or_clear_identity(or_connection_t *conn) { tor_assert(conn); memset(conn->identity_digest, 0, DIGEST_LEN); @@ -120,7 +120,7 @@ connection_or_set_identity_digest(or_connection_t *conn, /* If the identity was set previously, remove the old mapping. */ if (! tor_digest_is_zero(conn->identity_digest)) { - connection_or_remove_from_identity_map(conn); + connection_or_clear_identity(conn); if (conn->chan) channel_clear_identity_digest(TLS_CHAN_TO_BASE(conn->chan)); } diff --git a/src/or/connection_or.h b/src/or/connection_or.h index b35bcddca6..80a5bddb14 100644 --- a/src/or/connection_or.h +++ b/src/or/connection_or.h @@ -12,7 +12,7 @@ #ifndef TOR_CONNECTION_OR_H #define TOR_CONNECTION_OR_H -void connection_or_remove_from_identity_map(or_connection_t *conn); +void connection_or_clear_identity(or_connection_t *conn); void connection_or_clear_identity_map(void); void clear_broken_connection_map(int disable); or_connection_t *connection_or_get_for_extend(const char *digest, diff --git a/src/or/main.c b/src/or/main.c index 30adb16f4e..8239606c08 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -362,7 +362,7 @@ connection_unlink(connection_t *conn) } if (conn->type == CONN_TYPE_OR) { if (!tor_digest_is_zero(TO_OR_CONN(conn)->identity_digest)) - connection_or_remove_from_identity_map(TO_OR_CONN(conn)); + connection_or_clear_identity(TO_OR_CONN(conn)); /* connection_unlink() can only get called if the connection * was already on the closeable list, and it got there by * connection_mark_for_close(), which was called from diff --git a/src/test/test_link_handshake.c b/src/test/test_link_handshake.c index 9899e54231..9931702a34 100644 --- a/src/test/test_link_handshake.c +++ b/src/test/test_link_handshake.c @@ -323,7 +323,7 @@ recv_certs_cleanup(const struct testcase_t *test, void *obj) if (d) { tor_free(d->cell); certs_cell_free(d->ccell); - connection_or_remove_from_identity_map(d->c); + connection_or_clear_identity(d->c); connection_free_(TO_CONN(d->c)); circuitmux_free(d->chan->base_.cmux); tor_free(d->chan); @@ -1133,8 +1133,8 @@ authenticate_data_cleanup(const struct testcase_t *test, void *arg) authenticate_data_t *d = arg; if (d) { tor_free(d->cell); - connection_or_remove_from_identity_map(d->c1); - connection_or_remove_from_identity_map(d->c2); + connection_or_clear_identity(d->c1); + connection_or_clear_identity(d->c2); connection_free_(TO_CONN(d->c1)); connection_free_(TO_CONN(d->c2)); circuitmux_free(d->chan2->base_.cmux); |