[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Rename protover_contains_long_protocol_names to protover_list_is_invalid



commit efc969e86214fc53d3387c646ef0eab80ce15981
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Aug 3 08:55:17 2020 -0400

    Rename protover_contains_long_protocol_names to protover_list_is_invalid
    
    This is an automated commit, generated by this command:
    
    ./scripts/maint/rename_c_identifier.py \
            protover_contains_long_protocol_names protover_list_is_invalid
---
 src/core/or/protover.c          | 2 +-
 src/core/or/protover.h          | 2 +-
 src/core/or/protover_rust.c     | 2 +-
 src/feature/dirauth/dirvote.c   | 2 +-
 src/feature/dirparse/ns_parse.c | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/core/or/protover.c b/src/core/or/protover.c
index 22128dff18..485f7b3736 100644
--- a/src/core/or/protover.c
+++ b/src/core/or/protover.c
@@ -303,7 +303,7 @@ parse_protocol_list(const char *s)
  * name longer than MAX_PROTOCOL_NAME_LENGTH, and false otherwise.
  */
 bool
-protover_contains_long_protocol_names(const char *s)
+protover_list_is_invalid(const char *s)
 {
   smartlist_t *list = parse_protocol_list(s);
   if (!list)
diff --git a/src/core/or/protover.h b/src/core/or/protover.h
index 2950147d1b..24008f46b9 100644
--- a/src/core/or/protover.h
+++ b/src/core/or/protover.h
@@ -69,7 +69,7 @@ typedef enum protocol_type_t {
   PRT_FLOWCTRL  = 11,
 } protocol_type_t;
 
-bool protover_contains_long_protocol_names(const char *s);
+bool protover_list_is_invalid(const char *s);
 int protover_all_supported(const char *s, char **missing);
 int protover_is_supported_here(protocol_type_t pr, uint32_t ver);
 const char *protover_get_supported_protocols(void);
diff --git a/src/core/or/protover_rust.c b/src/core/or/protover_rust.c
index f44746b6da..99f3aa7f69 100644
--- a/src/core/or/protover_rust.c
+++ b/src/core/or/protover_rust.c
@@ -25,7 +25,7 @@ int protover_contains_long_protocol_names_(const char *s);
  * name longer than MAX_PROTOCOL_NAME_LENGTH, and false otherwise.
  */
 bool
-protover_contains_long_protocol_names(const char *s)
+protover_list_is_invalid(const char *s)
 {
   return protover_contains_long_protocol_names_(s) != 0;
 }
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c
index 080edd92f1..8676df76ab 100644
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@ -4567,7 +4567,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
     /* If it has a protover list and contains a protocol name greater than
      * MAX_PROTOCOL_NAME_LENGTH, skip it. */
     if (ri->protocol_list &&
-        protover_contains_long_protocol_names(ri->protocol_list)) {
+        protover_list_is_invalid(ri->protocol_list)) {
       continue;
     }
     if (ri->cache_info.published_on >= cutoff) {
diff --git a/src/feature/dirparse/ns_parse.c b/src/feature/dirparse/ns_parse.c
index 726da8a64c..927870c4aa 100644
--- a/src/feature/dirparse/ns_parse.c
+++ b/src/feature/dirparse/ns_parse.c
@@ -468,7 +468,7 @@ routerstatus_parse_entry_from_string(memarea_t *area,
     }
 
     // If the protover line is malformed, reject this routerstatus.
-    if (protocols && protover_contains_long_protocol_names(protocols)) {
+    if (protocols && protover_list_is_invalid(protocols)) {
       goto err;
     }
     summarize_protover_flags(&rs->pv, protocols, version);
@@ -1076,7 +1076,7 @@ dup_protocols_string(smartlist_t *tokens, bool *error, directory_keyword kw)
   directory_token_t *tok = find_opt_by_keyword(tokens, kw);
   if (!tok)
     return NULL;
-  if (protover_contains_long_protocol_names(tok->args[0]))
+  if (protover_list_is_invalid(tok->args[0]))
     *error = true;
   return tor_strdup(tok->args[0]);
 }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits