aboutsummaryrefslogtreecommitdiffstats
path: root/daemon/daemon_aux.c
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2017-03-11 17:57:30 +0000
committerbloodstalker <thabogre@gmail.com>2017-03-11 17:57:30 +0000
commit7273d3846898dbf867e251a5e94a52e20a71b78e (patch)
tree48bd99eb785549b2efdef4a6d17e6a59523780cf /daemon/daemon_aux.c
parentfixing some issues (diff)
downloadmutator-7273d3846898dbf867e251a5e94a52e20a71b78e.tar.gz
mutator-7273d3846898dbf867e251a5e94a52e20a71b78e.zip
fixing issues
Diffstat (limited to '')
-rw-r--r--daemon/daemon_aux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/daemon/daemon_aux.c b/daemon/daemon_aux.c
index 248df08..6057f2a 100644
--- a/daemon/daemon_aux.c
+++ b/daemon/daemon_aux.c
@@ -56,6 +56,7 @@ int mutator_server(FILE* log_file)
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)
@@ -142,8 +143,6 @@ 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)
{
@@ -154,6 +153,8 @@ int mutator_server(FILE* log_file)
/*intentionally left blank*/
}
+ close(client_sock);
+ close(socket_desc);
return 0;
}
/**********************************************************************************************************************/