[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Rename connection_or_remove_from_identity_map



commit 6aa239df363a9739df96cc4c4660b7aee8a7bef9
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Sep 19 16:26:27 2016 -0400

    Rename connection_or_remove_from_identity_map
---
 src/or/connection.c            | 4 ++--
 src/or/connection_or.c         | 4 ++--
 src/or/connection_or.h         | 2 +-
 src/or/main.c                  | 2 +-
 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 2e3df34..f806021 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 dbeab26..4449d3f 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 b35bcdd..80a5bdd 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 30adb16..8239606 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 9899e54..9931702 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);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits