[tor-commits] [tor/master] prop224: Rename hs_intro_circuit_is_suitable()

nickm at torproject.org nickm at torproject.org
Wed Jan 18 22:15:59 UTC 2017


commit 9d7505a62aebaaf2fdf0e3a8178b80be17047e7b
Author: David Goulet <dgoulet at torproject.org>
Date:   Tue Nov 15 14:18:48 2016 -0500

    prop224: Rename hs_intro_circuit_is_suitable()
    
    Adds a better semantic and it also follows the same interface for the
    INTRODUCE1 API which is circuit_is_suitable_for_introduce1().
    
    Signed-off-by: David Goulet <dgoulet at torproject.org>
---
 src/or/hs_intropoint.c | 4 ++--
 src/or/hs_intropoint.h | 2 +-
 src/or/rendmid.c       | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/or/hs_intropoint.c b/src/or/hs_intropoint.c
index 42b2055..2da3ee9 100644
--- a/src/or/hs_intropoint.c
+++ b/src/or/hs_intropoint.c
@@ -215,7 +215,7 @@ handle_establish_intro(or_circuit_t *circ, const uint8_t *request,
            circ->p_circ_id);
 
   /* Check that the circuit is in shape to become an intro point */
-  if (!hs_intro_circuit_is_suitable(circ)) {
+  if (!hs_intro_circuit_is_suitable_for_establish_intro(circ)) {
     goto err;
   }
 
@@ -286,7 +286,7 @@ circuit_is_suitable_intro_point(const or_circuit_t *circ,
 
 /* Return True if circuit is suitable for becoming an intro circuit. */
 int
-hs_intro_circuit_is_suitable(const or_circuit_t *circ)
+hs_intro_circuit_is_suitable_for_establish_intro(const or_circuit_t *circ)
 {
   return circuit_is_suitable_intro_point(circ, "ESTABLISH_INTRO");
 }
diff --git a/src/or/hs_intropoint.h b/src/or/hs_intropoint.h
index e1bad47..08b3470 100644
--- a/src/or/hs_intropoint.h
+++ b/src/or/hs_intropoint.h
@@ -33,7 +33,7 @@ int hs_intro_received_introduce1(or_circuit_t *circ, const uint8_t *request,
 MOCK_DECL(int, hs_intro_send_intro_established_cell,(or_circuit_t *circ));
 
 /* also used by rendservice.c */
-int hs_intro_circuit_is_suitable(const or_circuit_t *circ);
+int hs_intro_circuit_is_suitable_for_establish_intro(const or_circuit_t *circ);
 
 #ifdef HS_INTROPOINT_PRIVATE
 
diff --git a/src/or/rendmid.c b/src/or/rendmid.c
index 3319a63..b873ad7 100644
--- a/src/or/rendmid.c
+++ b/src/or/rendmid.c
@@ -38,7 +38,7 @@ rend_mid_establish_intro_legacy(or_circuit_t *circ, const uint8_t *request,
            "Received a legacy ESTABLISH_INTRO request on circuit %u",
            (unsigned) circ->p_circ_id);
 
-  if (!hs_intro_circuit_is_suitable(circ)) {
+  if (!hs_intro_circuit_is_suitable_for_establish_intro(circ)) {
     reason = END_CIRC_REASON_TORPROTOCOL;
     goto err;
   }





More information about the tor-commits mailing list