From c74584ed12e799a6fb612db6b8f7972a34a7de25 Mon Sep 17 00:00:00 2001
From: Brian May <brian@microcomaustralia.com.au>
Date: Fri, 22 Jun 2012 15:14:45 +1000
Subject: [PATCH] Ensure optval is defined correctly before calling setsockopt.

---
 fanout.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fanout.c b/fanout.c
index 1d7c9be..6e041ad 100644
--- a/fanout.c
+++ b/fanout.c
@@ -552,6 +552,7 @@ resetting counter\n");
                     fanout_error ("epoll_ctl: srvsock");
                 }
 
+                optval = 1;
                 if ((setsockopt (client_i->fd, SOL_SOCKET, SO_KEEPALIVE,
                       &optval, optlen)) == -1)
                     fanout_error ("failed setting keepalive");
-- 
GitLab