]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Refactor circuit_pick_create_handshake
authorteor <teor2345@gmail.com>
Mon, 31 Oct 2016 06:01:33 +0000 (17:01 +1100)
committerteor <teor2345@gmail.com>
Mon, 31 Oct 2016 06:01:33 +0000 (17:01 +1100)
Make the structure of circuit_pick_create_handshake consistent with
circuit_pick_extend_handshake.

No behaviour change.

src/or/circuitbuild.c

index 9893215866d0d14ff449b0cdfe86c1ac3cd75545..cb9c146fb7942477cd083cad553f78a4ce609bdb 100644 (file)
@@ -829,11 +829,11 @@ circuit_pick_create_handshake(uint8_t *cell_type_out,
   if (extend_info_supports_ntor(ei)) {
     *cell_type_out = CELL_CREATE2;
     *handshake_type_out = ONION_HANDSHAKE_TYPE_NTOR;
-    return;
+  } else {
+    /* XXXX030 Remove support for deciding to use TAP and EXTEND. */
+    *cell_type_out = CELL_CREATE;
+    *handshake_type_out = ONION_HANDSHAKE_TYPE_TAP;
   }
-
-  *cell_type_out = CELL_CREATE;
-  *handshake_type_out = ONION_HANDSHAKE_TYPE_TAP;
 }
 
 /** Decide whether to use a TAP or ntor handshake for extending to <b>ei</b>