--- a/tcp_server.c Tue May 30 12:34:25 2006 +0200
+++ b/tcp_server.c Tue May 30 12:57:31 2006 +0200
@@ -298,7 +298,20 @@
char *buffer2;
char name[MAX_STRING];
- assert (get_config(LOG_FILE, name, MAX_STRING) > 0);
+ if (get_config(LOG_FILE, name, MAX_STRING) < 0)
+ {
+ fprintf(stderr, "The tcp_server received a connection, but"
+ " there isn't any log file.");
+ return -1;
+ }
+
+ if (strncmp(name, "disabled", MAX_STRING) == 0)
+ {
+ fprintf(stderr, "The tcp_server received a connection, but"
+ " there isn't any log file.");
+ return -1;
+ }
+
fh = open(name, O_RDONLY);
if (fh == -1)