aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--daemon/daemon_aux.c2
-rw-r--r--daemon/mutatord.c2
-rw-r--r--daemon/mutatorserver.c1
3 files changed, 5 insertions, 0 deletions
diff --git a/daemon/daemon_aux.c b/daemon/daemon_aux.c
index 86e57ee..248df08 100644
--- a/daemon/daemon_aux.c
+++ b/daemon/daemon_aux.c
@@ -142,6 +142,8 @@ int mutator_server(FILE* log_file)
fprintf(log_file, "%s", "client disconnected\n");
fflush(stdout);
fprintf(log_file, "%s", "closing log file\n");
+ close(client_sock);
+ close(socket_desc);
}
else if (read_size == -1)
{
diff --git a/daemon/mutatord.c b/daemon/mutatord.c
index 7d4a244..a0496d3 100644
--- a/daemon/mutatord.c
+++ b/daemon/mutatord.c
@@ -141,8 +141,10 @@ int main(void)
}while(0);
/*@DEVI-these obviously will never run. theyre just a reminder that i need to handle the gracefull shutdown*/
+#if 0
fclose(mut_log);
exit(EXIT_SUCCESS);
+#endif
}
/*last line intentionally left blank*/
diff --git a/daemon/mutatorserver.c b/daemon/mutatorserver.c
index 99f86c1..5965a69 100644
--- a/daemon/mutatorserver.c
+++ b/daemon/mutatorserver.c
@@ -56,6 +56,7 @@ int main (int argc, char *argv[])
server.sin_family = AF_INET;
server.sin_addr.s_addr = INADDR_ANY;
server.sin_port = htons(8888);
+ memset(server.sin_zero, 0, 8);
/*Bind*/
if (bind(socket_desc, (struct sockaddr*)&server, sizeof(server)) < 0)