소스 검색

prop224: Refactor how we use connection_ap_handle_onion

Simply directly return its returned value.

Signed-off-by: David Goulet <dgoulet@torproject.org>
David Goulet 6 년 전
부모
커밋
5f94c4a0f1
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      src/or/connection_edge.c

+ 1 - 3
src/or/connection_edge.c

@@ -2017,9 +2017,7 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn,
     tor_assert(addresstype == ONION_V2_HOSTNAME ||
                addresstype == ONION_V3_HOSTNAME);
     tor_assert(!automap);
-    if (connection_ap_handle_onion(conn, socks, circ, addresstype) < 0) {
-      return -1;
-    }
+    return connection_ap_handle_onion(conn, socks, circ, addresstype);
   }
 
   return 0; /* unreached but keeps the compiler happy */