diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-12-07 13:03:21 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-08 16:48:01 -0500 |
commit | 5eef00eb049606bf5b5610af8e3ce9514bd95882 (patch) | |
tree | 8649aa69eeff7210c929600363101d89e0915c6c /src/or | |
parent | 9bf9e34a01a5b0b8d28ff2486c73e243561b4e3e (diff) | |
download | tor-5eef00eb049606bf5b5610af8e3ce9514bd95882.tar.gz tor-5eef00eb049606bf5b5610af8e3ce9514bd95882.zip |
Tiny cleanup of chan handling when setting connection ID digests
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/connection_or.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 046865d8b5..f0292bcf75 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 |