From 1569952654e988b44cd8a6bc6d329a28025db8c9 Mon Sep 17 00:00:00 2001 From: thompsa Date: Thu, 4 Mar 2010 20:00:43 +1300 Subject: The $bind=&$array variable from one loop seems to be truncated by using the same named variable in the next loop. The last array member is duplicated by array[n-1]. --- config/haproxy-dev/haproxy.inc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'config') diff --git a/config/haproxy-dev/haproxy.inc b/config/haproxy-dev/haproxy.inc index 275ea8ab..12920103 100644 --- a/config/haproxy-dev/haproxy.inc +++ b/config/haproxy-dev/haproxy.inc @@ -293,18 +293,18 @@ function haproxy_configure() { $a_bind[$bname]['extaddr'] = $backend['extaddr']; $a_bind[$bname]['port'] = $backend['port']; } - $bind = &$a_bind[$bname]; + $b = &$a_bind[$bname]; // Overwrite ? - $bind['type'] = $backend['type']; - $bind['forwardfor'] = $backend['forwardfor']; - $bind['httpclose'] = $backend['httpclose']; - $bind['max_connections'] = $backend['max_connections']; - $bind['client_timeout'] = $backend['client_timeout']; - $bind['advanced'] = $backend['advanced']; + $b['type'] = $backend['type']; + $b['forwardfor'] = $backend['forwardfor']; + $b['httpclose'] = $backend['httpclose']; + $b['max_connections'] = $backend['max_connections']; + $b['client_timeout'] = $backend['client_timeout']; + $b['advanced'] = $backend['advanced']; // pointer to each backend - $bind['config'][] = $backend; + $b['config'][] = $backend; } } -- cgit v1.2.3