소스 검색

Refactor circuit_pick_create_handshake

Make the structure of circuit_pick_create_handshake consistent with
circuit_pick_extend_handshake.

No behaviour change.
teor 7 년 전
부모
커밋
d81f2b5d81
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      src/or/circuitbuild.c

+ 4 - 4
src/or/circuitbuild.c

@@ -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>