1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

ctdb-ipalloc: Move merged IP list creation to ipalloc()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12254

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2016-09-12 15:59:09 +10:00 committed by Martin Schwenke
parent c1efb801a4
commit 7522a7aee8

View File

@ -231,9 +231,7 @@ bool ipalloc_set_public_ips(struct ipalloc_state *ipalloc_state,
ipalloc_state->available_public_ips = available_ips;
ipalloc_state->known_public_ips = known_ips;
ipalloc_state->all_ips = create_merged_ip_list(ipalloc_state);
return (ipalloc_state->all_ips != NULL);
return true;
}
/* This can only return false if there are no available IPs *and*
@ -282,6 +280,11 @@ struct public_ip_list *ipalloc(struct ipalloc_state *ipalloc_state)
{
bool ret = false;
ipalloc_state->all_ips = create_merged_ip_list(ipalloc_state);
if (ipalloc_state->all_ips == NULL) {
return NULL;
}
switch (ipalloc_state->algorithm) {
case IPALLOC_LCP2:
ret = ipalloc_lcp2(ipalloc_state);