Skip to content

Commit

Permalink
move debug message out of alarm signal
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBarthelmeh committed Dec 5, 2023
1 parent a8b284f commit 1478b7d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/wolfsshd/wolfsshd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,6 @@ static __thread int timeOut = 0;
#endif
static void alarmCatch(int signum)
{
wolfSSH_Log(WS_LOG_ERROR, "[SSHD] Failed login within grace period");
timeOut = 1;
(void)signum;
}
Expand Down Expand Up @@ -1532,6 +1531,11 @@ static void* HandleConnection(void* arg)
}

if (graceTime > 0) {
if (timeOut) {
wolfSSH_Log(WS_LOG_ERROR,
"[SSHD] Failed login within grace period");
}

#ifdef WIN32
/* @TODO SetTimer(NULL, NULL, graceTime, alarmCatch); */
#else
Expand Down

0 comments on commit 1478b7d

Please sign in to comment.