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

[tor-commits] [tor/master] Tiny cleanup of chan handling when setting connection ID digests



commit 5eef00eb049606bf5b5610af8e3ce9514bd95882
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Dec 7 13:03:21 2016 -0500

    Tiny cleanup of chan handling when setting connection ID digests
---
 src/or/connection_or.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 046865d..f0292bc 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -153,8 +153,8 @@ connection_or_set_identity_digest(or_connection_t *conn,
   /* If the identity was set previously, remove the old mapping. */
   if (rsa_id_was_set) {
     connection_or_clear_identity(conn);
-    if (conn->chan)
-      channel_clear_identity_digest(TLS_CHAN_TO_BASE(conn->chan));
+    if (chan)
+      channel_clear_identity_digest(chan);
   }
 
   memcpy(conn->identity_digest, rsa_digest, DIGEST_LEN);
@@ -165,9 +165,8 @@ connection_or_set_identity_digest(or_connection_t *conn,
     return;
 
   /* Deal with channels */
-  if (conn->chan)
-    channel_set_identity_digest(TLS_CHAN_TO_BASE(conn->chan),
-                                rsa_digest, ed_id);
+  if (chan)
+    channel_set_identity_digest(chan, rsa_digest, ed_id);
 }
 
 /** Remove the Extended ORPort identifier of <b>conn</b> from the



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