MT#9709 get_all_cluster_set*: fix 2437330d4e

This was producing empty values at kamailio.cfg template on CE
with a cluster_set of central type

Thanks to Anibal Cañada for the bugreport

Change-Id: Ib11295611859ef2828dc1d2e6900bf201c20ad7a
changes/08/508/1
Victor Seva 11 years ago
parent c3ec779521
commit 4d297ff3fc

@ -15,7 +15,7 @@
out = [];
IF cluster_sets.type == 'central';
set_hosts = [ hosts.${argv.host}, hosts.${argv.host}.peer ];
set_hosts = [ argv.host, hosts.${argv.host}.peer ];
ELSE;
set_hosts = hosts.keys;
END;
@ -30,7 +30,7 @@
NEXT UNLESS hosts.$host.role.grep('^' _ argv.type _ '$').size();
FOREACH iface IN hosts.$host.interfaces;
NEXT UNLESS hosts.$host.$iface.cluster_sets.grep('^' _ set _ '$').size();
theset.ips.push(hosts.$host.$iface.ip);
theset.ips.push(hosts.$host.$iface.ip) UNLESS theset.ips.defined(hosts.$host.$iface.ip);
END;
END;

@ -15,7 +15,7 @@
out = [];
IF cluster_sets.type == 'central';
set_hosts = [ hosts.${argv.host}, hosts.${argv.host}.peer ];
set_hosts = [ argv.host, hosts.${argv.host}.peer ];
ELSE;
set_hosts = hosts.keys;
END;
@ -35,7 +35,7 @@
NEXT UNLESS hosts.$host.$iface.cluster_sets.grep('^' _ set _ '$').size();
blktmp.processed_hosts.$peer = 1;
FOREACH ip IN hosts.$host.$iface.shared_ip;
theset.ips.push(ip);
theset.ips.push(ip) UNLESS theset.ips.defined(ip);
END;
END;
END;

Loading…
Cancel
Save