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

nickm at torproject.org nickm at torproject.org
Thu Aug 24 19:13:52 UTC 2017


commit cb462b95b7e864b71ea3dc0a6bfb76c30fb8d378
Author: David Goulet <dgoulet at torproject.org>
Date:   Tue Aug 22 14:12:49 2017 -0400

    prop224: Rename hs_desc_encode_lspec()
    
    Give it a name that shows the transition from a descriptor link spec to a
    trunnel link spec.
    
    Signed-off-by: David Goulet <dgoulet at torproject.org>
---
 src/or/hs_client.c     | 2 +-
 src/or/hs_descriptor.c | 4 ++--
 src/or/hs_descriptor.h | 3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/or/hs_client.c b/src/or/hs_client.c
index 71186b261..90124fb8e 100644
--- a/src/or/hs_client.c
+++ b/src/or/hs_client.c
@@ -407,7 +407,7 @@ desc_intro_point_to_extend_info(const hs_desc_intro_point_t *ip)
    * representation which is a trunnel object. */
   SMARTLIST_FOREACH_BEGIN(ip->link_specifiers,
                           const hs_desc_link_specifier_t *, desc_lspec) {
-    link_specifier_t *lspec = hs_desc_encode_lspec(desc_lspec);
+    link_specifier_t *lspec = hs_desc_lspec_to_trunnel(desc_lspec);
     smartlist_add(lspecs, lspec);
   } SMARTLIST_FOREACH_END(desc_lspec);
 
diff --git a/src/or/hs_descriptor.c b/src/or/hs_descriptor.c
index b9233c6d7..af443b995 100644
--- a/src/or/hs_descriptor.c
+++ b/src/or/hs_descriptor.c
@@ -331,7 +331,7 @@ encode_link_specifiers(const smartlist_t *specs)
 
   SMARTLIST_FOREACH_BEGIN(specs, const hs_desc_link_specifier_t *,
                           spec) {
-    link_specifier_t *ls = hs_desc_encode_lspec(spec);
+    link_specifier_t *ls = hs_desc_lspec_to_trunnel(spec);
     if (ls) {
       link_specifier_list_add_spec(lslist, ls);
     }
@@ -2538,7 +2538,7 @@ hs_descriptor_clear_intro_points(hs_descriptor_t *desc)
  * link specifier object that is the encoded representation of spec. Return
  * NULL on error. */
 link_specifier_t *
-hs_desc_encode_lspec(const hs_desc_link_specifier_t *spec)
+hs_desc_lspec_to_trunnel(const hs_desc_link_specifier_t *spec)
 {
   tor_assert(spec);
 
diff --git a/src/or/hs_descriptor.h b/src/or/hs_descriptor.h
index eeeb3e38a..ce225d521 100644
--- a/src/or/hs_descriptor.h
+++ b/src/or/hs_descriptor.h
@@ -233,7 +233,8 @@ size_t hs_desc_plaintext_obj_size(const hs_desc_plaintext_data_t *data);
 hs_desc_intro_point_t *hs_desc_intro_point_new(void);
 void hs_desc_intro_point_free(hs_desc_intro_point_t *ip);
 
-link_specifier_t *hs_desc_encode_lspec(const hs_desc_link_specifier_t *spec);
+link_specifier_t *hs_desc_lspec_to_trunnel(
+                                   const hs_desc_link_specifier_t *spec);
 
 #ifdef HS_DESCRIPTOR_PRIVATE
 





More information about the tor-commits mailing list