]> git.kaiwu.me - haproxy.git/commitdiff
[BUG] Fix listen & more of 2 couples <ip>:<port>
authorKrzysztof Piotr Oledzki <ole@ans.pl>
Tue, 27 Jan 2009 15:57:08 +0000 (16:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 27 Jan 2009 20:00:59 +0000 (21:00 +0100)
Fix "listen www-mutualise 80.248.x.y1:80,80.248.x.y2:80,80.248.x.y3:80":

[ALERT] 309/161509 (15450) : Invalid server address: '80.248.x.y1:80,80.248.x.y2'
[ALERT] 309/161509 (15450) : Error reading configuration file : /etc/haproxy/haproxy.cfg

Bug reported by Laurent Dolosor.

src/cfgparse.c

index 4da1b6771a264e90960bb5a8bb01fafaa72914d0..64a001e780d7a38f7fc3a044bbd646e9b0b319cf 100644 (file)
@@ -144,7 +144,7 @@ static struct listener *str2listener(char *str, struct listener *tail)
 
                str = next;
                /* 1) look for the end of the first address */
-               if ((next = strrchr(str, ',')) != NULL) {
+               if ((next = strchr(str, ',')) != NULL) {
                        *next++ = 0;
                }