1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

ctdb-takeover: Handle case where there are no RELEASE_IPs to send

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2017-01-12 06:52:32 +11:00 committed by Martin Schwenke
parent b7cfac778e
commit a5b187202f

View File

@ -295,6 +295,12 @@ static struct tevent_req *release_ip_send(TALLOC_CTX *mem_ctx,
} }
} }
if (substate->count == 0) {
/* No releases to send for this address... */
TALLOC_FREE(substate);
continue;
}
ip.pnn = tmp_ip->pnn; ip.pnn = tmp_ip->pnn;
ip.addr = tmp_ip->addr; ip.addr = tmp_ip->addr;
ctdb_req_control_release_ip(&request, &ip); ctdb_req_control_release_ip(&request, &ip);
@ -311,6 +317,12 @@ static struct tevent_req *release_ip_send(TALLOC_CTX *mem_ctx,
state->num_sent++; state->num_sent++;
} }
/* None sent, finished... */
if (state->num_sent == 0) {
tevent_req_done(req);
return tevent_req_post(req, ev);
}
return req; return req;
} }