From 0aba9750fbe1e3aaf077eab9d5087f6d366ea686 Mon Sep 17 00:00:00 2001
From: Philippe PITTOLI
Date: Fri, 5 Oct 2018 22:33:43 +0200
Subject: [PATCH] set new_connection to 0 if nobody connected
---
core/communication.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/communication.c b/core/communication.c
index 992615c..032c932 100644
--- a/core/communication.c
+++ b/core/communication.c
@@ -187,6 +187,7 @@ static int getMaxFd(struct ipc_clients *clients)
int ipc_server_select (struct ipc_clients *clients, struct ipc_service *srv
, struct ipc_clients *active_clients, int *new_connection)
{
+ *new_connection = 0;
assert (clients != NULL);
assert (active_clients != NULL);
@@ -241,4 +242,4 @@ int ipc_server_select (struct ipc_clients *clients, struct ipc_service *srv
}
return 0;
-}
+}