mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 23:56:57 +02:00
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:
parent
f1f4b93a67
commit
ab6fef4882
@ -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 *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.
|
||||
* Returns NULL on success, error message string otherwise.
|
||||
|
26
src/server.c
26
src/server.c
@ -2327,32 +2327,6 @@ const char *server_parse_weight_change_request(struct server *sv,
|
||||
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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user