mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
tools/ctdb: Do not use function return value as pnn
This fixes the wrong code where same variable 'ret' is used to track the pnn and the return value of a function call. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 718233c445cd6627ab3962b6565c2655f1f8efd0)
This commit is contained in:
parent
85c8deca3f
commit
56ee668a51
@ -2255,10 +2255,12 @@ static int control_delip(struct ctdb_context *ctdb, int argc, const char **argv)
|
||||
}
|
||||
|
||||
if (ips->ips[i].pnn == options.pnn) {
|
||||
ret = find_other_host_for_public_ip(ctdb, &addr);
|
||||
if (ret != -1) {
|
||||
int pnn;
|
||||
|
||||
pnn = find_other_host_for_public_ip(ctdb, &addr);
|
||||
if (pnn != -1) {
|
||||
do {
|
||||
ret = move_ip(ctdb, &addr, ret);
|
||||
ret = move_ip(ctdb, &addr, pnn);
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR,("Failed to move ip to node %d. Wait 3 seconds and try again.\n", options.pnn));
|
||||
sleep(3);
|
||||
|
Loading…
Reference in New Issue
Block a user