diff --git a/main.c b/main.c index 89ed6b3..79abf45 100644 --- a/main.c +++ b/main.c @@ -227,11 +227,8 @@ int isinarray( int pid, int array[], int n ) { if( pid == array[x]) { - if (loglevel >= DEBUG ) - { - sprintf(strlog, "pid %i is in array", pid); - printlog(strlog, DEBUG, 0 ); - } + sprintf(strlog, "pid %i is in array", pid); + printlog(strlog, DEBUG, 0 ); return x; } } @@ -563,6 +560,7 @@ int main() while (1) { memset(&conn, 0, sizeof(conn)); + ip[0] = '\0'; // get the sshd process ID (PID) if ( (fh = fopen("/run/sshd.pid", "r" )) == NULL) {