Display the number of failed password attempts (if any) when the server is

locked. From Tom Doherty.
This commit is contained in:
Nicholas Marriott
2009-07-20 14:37:51 +00:00
parent b292f71c49
commit 54afcfbfb4
4 changed files with 17 additions and 1 deletions

View File

@ -213,9 +213,11 @@ server_unlock(const char *s)
}
server_locked = 0;
password_failures = 0;
return (0);
wrong:
password_failures++;
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
c = ARRAY_ITEM(&clients, i);
if (c == NULL || c->prompt_buffer == NULL)
@ -223,7 +225,7 @@ wrong:
*c->prompt_buffer = '\0';
c->prompt_index = 0;
server_status_client(c);
server_redraw_client(c);
}
return (-1);