Forráskód Böngészése

Move connection_or_remove_from_identity_map() to connection_unlink, but dont remove the other; just make it warn.

svn:r5470
Nick Mathewson 20 éve
szülő
commit
a6eb8cd2a0
2 módosított fájl, 4 hozzáadás és 0 törlés
  1. 1 0
      src/or/connection.c
  2. 3 0
      src/or/main.c

+ 1 - 0
src/or/connection.c

@@ -238,6 +238,7 @@ _connection_free(connection_t *conn)
   }
 
   if (conn->type == CONN_TYPE_OR && !tor_digest_is_zero(conn->identity_digest)) {
+    warn(LD_BUG, "called on OR conn with non-zeroed idenity_digest");
     connection_or_remove_from_identity_map(conn);
   }
 

+ 3 - 0
src/or/main.c

@@ -198,6 +198,9 @@ connection_unlink(connection_t *conn, int remove)
   if (conn->type == CONN_TYPE_EXIT) {
     assert_connection_edge_not_dns_pending(conn);
   }
+  if (conn->type == CONN_TYPE_OR && !tor_digest_is_zero(conn->identity_digest)) {
+    connection_or_remove_from_identity_map(conn);
+  }
   connection_free(conn);
 }