[PATCH] [BUG] Fix listen & more of 2 couples <ip>:<port>

From: Krzysztof Piotr Oledzki <ole#ans.pl>
Date: Tue, 27 Jan 2009 17:50:11 +0100


From 283a117469883ba1d9e61e3c86f87ce4bcddc976 Mon Sep 17 00:00:00 2001 From: Krzysztof Piotr Oledzki <ole#ans.pl> Date: Tue, 27 Jan 2009 16:57:08 +0100
Subject: [BUG] Fix listen & more of 2 couples <ip>:<port>

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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/cfgparse.c b/src/cfgparse.c
index 46f4ba7..75766a2 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -159,7 +159,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;
 		}
 
-- 
1.6.0.4
Received on 2009/01/27 17:50

This archive was generated by hypermail 2.2.0 : 2009/01/27 18:00 CET