CLEANUP: server: remove unused server_parse_addr_change_request() function

server_parse_addr_change_request() was completely replaced by the newer
srv_update_addr_port() function. Considering the function doesn't offer
useful features that srv_update_addr_port() couldn't do, we simply
remove the function.
This commit is contained in:
Aurelien DARRAGON 2023-12-07 15:55:31 +01:00 committed by Christopher Faulet
parent f1f4b93a67
commit ab6fef4882
2 changed files with 0 additions and 34 deletions

View File

@ -122,14 +122,6 @@ void server_recalc_eweight(struct server *sv, int must_update);
const char *server_parse_weight_change_request(struct server *sv, const char *server_parse_weight_change_request(struct server *sv,
const char *weight_str); const char *weight_str);
/*
* Parses addr_str and configures sv accordingly. updater precise
* the source of the change in the associated message log.
* Returns NULL on success, error message string otherwise.
*/
const char *server_parse_addr_change_request(struct server *sv,
const char *addr_str, const char *updater);
/* /*
* Parses maxconn_str and configures sv accordingly. * Parses maxconn_str and configures sv accordingly.
* Returns NULL on success, error message string otherwise. * Returns NULL on success, error message string otherwise.

View File

@ -2327,32 +2327,6 @@ const char *server_parse_weight_change_request(struct server *sv,
return NULL; return NULL;
} }
/*
* Parses <addr_str> and configures <sv> accordingly. <from> precise
* the source of the change in the associated message log.
* Returns:
* - error string on error
* - NULL on success
*
* Must be called with the server lock held.
*/
const char *server_parse_addr_change_request(struct server *sv,
const char *addr_str, const char *updater)
{
unsigned char ip[INET6_ADDRSTRLEN];
if (inet_pton(AF_INET6, addr_str, ip)) {
srv_update_addr(sv, ip, AF_INET6, updater);
return NULL;
}
if (inet_pton(AF_INET, addr_str, ip)) {
srv_update_addr(sv, ip, AF_INET, updater);
return NULL;
}
return "Could not understand IP address format.\n";
}
/* /*
* Must be called with the server lock held. * Must be called with the server lock held.
*/ */