aboutsummaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--daemon/daemon_aux.c1
-rw-r--r--daemon/mutatorclient.c4
-rw-r--r--daemon/mutatorserver.c1
3 files changed, 5 insertions, 1 deletions
diff --git a/daemon/daemon_aux.c b/daemon/daemon_aux.c
index cce2372..86e57ee 100644
--- a/daemon/daemon_aux.c
+++ b/daemon/daemon_aux.c
@@ -49,6 +49,7 @@ int mutator_server(FILE* log_file)
if (socket_desc < 0)
{
fprintf(log_file, "%s", "could not create socket.\n");
+ exit(EXIT_FAILURE);
}
fprintf (log_file, "%s", "socket created.\n");
diff --git a/daemon/mutatorclient.c b/daemon/mutatorclient.c
index 9177024..d65eef5 100644
--- a/daemon/mutatorclient.c
+++ b/daemon/mutatorclient.c
@@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.*
/*standard header libraries*/
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
@@ -47,6 +48,7 @@ int main(int argc, char *argv[])
if (sock == -1)
{
printf ("could not create socket");
+ exit(EXIT_FAILURE);
}
puts("created socket");
@@ -69,7 +71,7 @@ int main(int argc, char *argv[])
printf("enter massage: ");
/*@DEVI-should later do something about reading from stdin*/
- if (fgets(message, 4000, stdin) == NULL)
+ if (fgets(message, 1000, stdin) == NULL)
{
puts("could not read from stdin");
}
diff --git a/daemon/mutatorserver.c b/daemon/mutatorserver.c
index 13a31d3..99f86c1 100644
--- a/daemon/mutatorserver.c
+++ b/daemon/mutatorserver.c
@@ -49,6 +49,7 @@ int main (int argc, char *argv[])
if (socket_desc < 0)
{
printf("could not create socket.");
+ exit(EXIT_FAILURE);
}
puts ("socket created.");