Blame SOURCES/bz1057258.patch

ff7ccc
commit 04710b40794fb31e9cd70c4a205decf6b40206fd
ff7ccc
Author: Ryan McCabe <rmccabe@redhat.com>
ff7ccc
Date:   Wed Jul 10 17:31:21 2013 -0400
ff7ccc
ff7ccc
    fence-virt: Fail properly if unable to bind the listener socket
ff7ccc
    
ff7ccc
    Bail out properly in multicast mode if we're unable to bind the TCP
ff7ccc
    listener socket.
ff7ccc
    
ff7ccc
    Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
ff7ccc
ff7ccc
diff --git a/client/mcast.c b/client/mcast.c
ff7ccc
index ddc1a9c..9ad48ae 100644
ff7ccc
--- a/client/mcast.c
ff7ccc
+++ b/client/mcast.c
ff7ccc
@@ -313,11 +313,14 @@ mcast_fence_virt(fence_virt_args_t *args)
ff7ccc
 		if (lfd < 0) {
ff7ccc
 			printf("Failed to listen: %s\n", strerror(errno));
ff7ccc
 			usleep(args->retr_time * 100000);
ff7ccc
-			--attempts;
ff7ccc
-			continue;
ff7ccc
+			if (--attempts > 0)
ff7ccc
+				continue;
ff7ccc
 		}
ff7ccc
 	} while (0);
ff7ccc
 
ff7ccc
+	if (lfd < 0)
ff7ccc
+		return -1;
ff7ccc
+
ff7ccc
 	gettimeofday(&tv, NULL);
ff7ccc
 	seqno = (uint32_t)tv.tv_usec;
ff7ccc