mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +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:
parent
b7cfac778e
commit
a5b187202f
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user