mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user