diff options
author | Martin Schwenke <martin@meltin.net> | 2017-01-27 14:43:34 +1100 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2017-02-24 07:47:11 +0100 |
commit | f7f23dca09418da82d076bd25fb1fa4c328ba76d (patch) | |
tree | ba5f0f66f89a919c462969bb497e725db43db261 /ctdb | |
parent | 42bcfa6a51cd829304742fd3aa70d8958c5b10fe (diff) | |
download | samba-f7f23dca09418da82d076bd25fb1fa4c328ba76d.tar.gz |
ctdb-takeover: Short circuit if fetching IPs from no nodes
The current code will fetch IP from all connected and all active
nodes, so this can't happen. However, catch it anyway in case the
calling code changes.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/ctdb_takeover_helper.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_takeover_helper.c b/ctdb/server/ctdb_takeover_helper.c index 796d45cc4a7..05397051085 100644 --- a/ctdb/server/ctdb_takeover_helper.c +++ b/ctdb/server/ctdb_takeover_helper.c @@ -122,6 +122,12 @@ static struct tevent_req *get_public_ips_send( return tevent_req_post(req, ev); } + /* Short circuit if no nodes being asked for IPs */ + if (state->count == 0) { + tevent_req_done(req); + return tevent_req_post(req, ev); + } + ctdb_req_control_get_public_ips(&request, available_only); subreq = ctdb_client_control_multi_send(mem_ctx, ev, client, state->pnns, |