From dee1d5e38666cd5e8ab97e832dd4530fdb654ce5 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 14 May 2017 23:47:15 +0200 Subject: [PATCH] in int getforwardID(char * str) we have to use str instead of readbuffer --- parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parser.c b/parser.c index 95e6ef62..9b49dde0 100644 --- a/parser.c +++ b/parser.c @@ -447,7 +447,7 @@ void process_pihole_log(int file) // Set its counter to 1 clients[clientID].count = 1; // Store client IP - clients[clientID].ip = strdup(client) + clients[clientID].ip = strdup(client); memory.clientips += (strlen(client) + 1) * sizeof(char); // Store client hostname clients[clientID].name = strdup(hostname); @@ -768,9 +768,9 @@ int getforwardID(char * str) size_t forwardlen = forwardend-(forwardstart+4); if(forwardlen < 1) { - logg("Notice: Skipping malformated log line (forward length < 1): %s", strtok(readbuffer,"\n")); + logg("Notice: Skipping malformated log line (forward length < 1): %s", strtok(str,"\n")); // Skip this line - continue; + return -2; } char *forward = calloc(forwardlen+1,sizeof(char));