From 5e4e1fe6ac91a6a4dcc286115e76ee87d82fcbfa Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Fri, 27 Dec 2013 14:33:18 -0500 Subject: [PATCH] qrexec-daemon: fix pathological break-out-of-wait-loop If the timeout is 1, attempting to retry would not actually retry, since i would be incremented just after being reset to 0, and would thus break out of the loop. --- qrexec/qrexec-daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qrexec/qrexec-daemon.c b/qrexec/qrexec-daemon.c index 36b9389..b2eef9e 100644 --- a/qrexec/qrexec-daemon.c +++ b/qrexec/qrexec-daemon.c @@ -173,7 +173,7 @@ void init(int xid) fprintf(stderr, "."); if (i==startup_timeout-1) { if (ask_on_connect_timeout(xid, startup_timeout)) - i=0; + i=-1; } } fprintf(stderr, "Cannot connect to qrexec agent for %d seconds, giving up\n", startup_timeout);