aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mds-server.c2
-rw-r--r--src/mds-server.h5
2 files changed, 7 insertions, 0 deletions
diff --git a/src/mds-server.c b/src/mds-server.c
index a82c5e0..4cc3e03 100644
--- a/src/mds-server.c
+++ b/src/mds-server.c
@@ -332,6 +332,7 @@ void* slave_loop(void* data)
/* Fill information table. */
information->list_entry = entry;
information->socket_fd = socket_fd;
+ information->open = 1;
if (mds_message_initialise(&(information->message)))
{
perror(*argv);
@@ -356,6 +357,7 @@ void* slave_loop(void* data)
else if (errno == ECONNRESET)
{
r = mds_message_read(&(information->message), socket_fd);
+ information->open = 0;
if (r == 0)
{
/* TODO */
diff --git a/src/mds-server.h b/src/mds-server.h
index 5c41c82..7b03501 100644
--- a/src/mds-server.h
+++ b/src/mds-server.h
@@ -40,6 +40,11 @@ typedef struct client
int socket_fd;
/**
+ * Whether the socket is open
+ */
+ int open;
+
+ /**
* Message read buffer for the client
*/
mds_message_t message;