fence_virt: Fix logic error in fence_xvm

Fix a logic error in fence_xvm that would cause fence_xvm to fail
to retry if binding the TCP port for authenticating requests
failed.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
This commit is contained in:
Ryan McCabe 2017-05-28 22:20:50 -04:00
parent 4f81575661
commit 0745f1c7ab

View File

@ -1,5 +1,5 @@
/*
Copyright Red Hat, Inc. 2006
Copyright Red Hat, Inc. 2006-2017
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@ -119,7 +119,6 @@ do_read_hostlist(int fd, int timeout)
printf("%-32s %s %s\n", hinfo.domain, hinfo.uuid,
(hinfo.state == 1) ? "on" : "off");
} while (1);
}
@ -292,6 +291,7 @@ mcast_fence_virt(fence_virt_args_t *args)
attempts = args->timeout * 10 / args->retr_time;
listen_loop:
do {
switch (args->net.auth) {
case AUTH_NONE:
@ -314,7 +314,7 @@ mcast_fence_virt(fence_virt_args_t *args)
printf("Failed to listen: %s\n", strerror(errno));
usleep(args->retr_time * 100000);
if (--attempts > 0)
continue;
goto listen_loop;
}
} while (0);