summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormiau <miaukatzemiau@priveasy.de>2011-06-13 19:42:21 (GMT)
committermiau <miaukatzemiau@priveasy.de>2011-06-13 19:42:21 (GMT)
commit2a3cdbc40c3c9e1324706d18e0dead20f28b45d4 (patch)
tree04bc1358d03fe7b8023ca3bdb8db40093f5b0d0d
parent736c5adfd9699929a2aee4f57ed4230dbf3fb767 (diff)
listener: adhere to no news is good news, imporve exit
-rw-r--r--broadcaster.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/broadcaster.c b/broadcaster.c
index 4160b93..9c02f79 100644
--- a/broadcaster.c
+++ b/broadcaster.c
@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
total_len = task_len + 1 + strlen(message);
if (total_len > MAXBUFLEN) {
fprintf(stderr,"payload to long: max %d bytes, was %d\n", MAXBUFLEN, total_len);
- exit(-1);
+ exit(1);
}
strcpy(buf, task);
buf[task_len] = 0;
@@ -70,10 +70,5 @@ int main(int argc, char *argv[])
exit(1);
}
- printf("sent %d bytes to %s\n", numbytes,
- inet_ntoa(their_addr.sin_addr));
-
- close(sockfd);
-
return 0;
}
contact: Jan Huwald // Impressum