version 1.27, 2009/09/02 21:25:57 |
version 1.28, 2009/09/04 13:29:10 |
|
|
screen_write_cursormove(&ctx, 0, 0); |
screen_write_cursormove(&ctx, 0, 0); |
screen_write_puts( |
screen_write_puts( |
&ctx, &gc, "%u failed attempts", password_failures); |
&ctx, &gc, "%u failed attempts", password_failures); |
|
if (time(NULL) < password_backoff) |
|
screen_write_puts(&ctx, &gc, "; sleeping"); |
} |
} |
|
|
screen_write_stop(&ctx); |
screen_write_stop(&ctx); |
|
|
server_second_timers(void) |
server_second_timers(void) |
{ |
{ |
struct window *w; |
struct window *w; |
|
struct client *c; |
struct window_pane *wp; |
struct window_pane *wp; |
u_int i; |
u_int i; |
int xtimeout; |
int xtimeout; |
|
|
time_t t; |
time_t t; |
|
|
t = time(NULL); |
t = time(NULL); |
|
|
xtimeout = options_get_number(&global_s_options, "lock-after-time"); |
xtimeout = options_get_number(&global_s_options, "lock-after-time"); |
if (xtimeout > 0 && t > server_activity + xtimeout) |
if (xtimeout > 0 && t > server_activity + xtimeout) |
server_lock(); |
server_lock(); |
|
|
TAILQ_FOREACH(wp, &w->panes, entry) { |
TAILQ_FOREACH(wp, &w->panes, entry) { |
if (wp->mode != NULL && wp->mode->timer != NULL) |
if (wp->mode != NULL && wp->mode->timer != NULL) |
wp->mode->timer(wp); |
wp->mode->timer(wp); |
|
} |
|
} |
|
|
|
if (t > password_backoff) { |
|
for (i = 0; i < ARRAY_LENGTH(&clients); i++) { |
|
if ((c = ARRAY_ITEM(&clients, i)) != NULL) |
|
server_redraw_client(c); |
} |
} |
} |
} |
|
|