summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ctdb/server/ipalloc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ctdb/server/ipalloc.c b/ctdb/server/ipalloc.c
index ffec5e93ce0..e416c743c2d 100644
--- a/ctdb/server/ipalloc.c
+++ b/ctdb/server/ipalloc.c
@@ -106,8 +106,7 @@ static int getips_count_callback(void *param, void *data)
* merged list of all public addresses needs to be built so that IP
* allocation can be done. */
static struct public_ip_list *
-create_merged_ip_list(struct ipalloc_state *ipalloc_state,
- struct ctdb_public_ip_list *known_ips)
+create_merged_ip_list(struct ipalloc_state *ipalloc_state)
{
int i, j;
struct public_ip_list *ip_list;
@@ -116,14 +115,14 @@ create_merged_ip_list(struct ipalloc_state *ipalloc_state,
ip_tree = trbt_create(ipalloc_state, 0);
- if (known_ips == NULL) {
+ if (ipalloc_state->known_public_ips == NULL) {
DEBUG(DEBUG_ERR, ("Known public IPs not set\n"));
return NULL;
}
for (i=0; i < ipalloc_state->num; i++) {
- public_ips = &known_ips[i];
+ public_ips = &ipalloc_state->known_public_ips[i];
for (j=0; j < public_ips->num; j++) {
struct public_ip_list *tmp_ip;
@@ -232,8 +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,
- known_ips);
+ ipalloc_state->all_ips = create_merged_ip_list(ipalloc_state);
return (ipalloc_state->all_ips != NULL);
}