]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: server: fix the format of the warning on address change
authorThierry Fournier <tfournier@arpalert.org>
Wed, 24 Feb 2016 07:13:13 +0000 (08:13 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Feb 2016 22:37:39 +0000 (23:37 +0100)
When the server address is changed, a message with unrequired '\n' or
'.' is displayed, like this:

   [WARNING] 054/101137 (3229) : zzzz/s3 changed its IP from 127.0.0.1 to ::55 by stats command
   .

This patch remove the '\n' which is sent before the '.'.

This patch must be backported in 1.6

src/server.c

index 30722fcd20bf6884aedee4282e6a2bdd9610fcf9..cd32e8040c9137f681a25478c0f990053b40c810 100644 (file)
@@ -819,11 +819,11 @@ const char *server_parse_addr_change_request(struct server *sv,
        unsigned char ip[INET6_ADDRSTRLEN];
 
        if (inet_pton(AF_INET6, addr_str, ip)) {
-               update_server_addr(sv, ip, AF_INET6, "stats command\n");
+               update_server_addr(sv, ip, AF_INET6, "stats command");
                return NULL;
        }
        if (inet_pton(AF_INET, addr_str, ip)) {
-               update_server_addr(sv, ip, AF_INET, "stats command\n");
+               update_server_addr(sv, ip, AF_INET, "stats command");
                return NULL;
        }