=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/server.c,v retrieving revision 1.27 retrieving revision 1.28 diff -c -r1.27 -r1.28 *** src/usr.bin/tmux/server.c 2009/09/02 21:25:57 1.27 --- src/usr.bin/tmux/server.c 2009/09/04 13:29:10 1.28 *************** *** 1,4 **** ! /* $OpenBSD: server.c,v 1.27 2009/09/02 21:25:57 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: server.c,v 1.28 2009/09/04 13:29:10 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 605,610 **** --- 605,612 ---- screen_write_cursormove(&ctx, 0, 0); screen_write_puts( &ctx, &gc, "%u failed attempts", password_failures); + if (time(NULL) < password_backoff) + screen_write_puts(&ctx, &gc, "; sleeping"); } screen_write_stop(&ctx); *************** *** 1183,1188 **** --- 1185,1191 ---- server_second_timers(void) { struct window *w; + struct client *c; struct window_pane *wp; u_int i; int xtimeout; *************** *** 1191,1196 **** --- 1194,1200 ---- time_t t; t = time(NULL); + xtimeout = options_get_number(&global_s_options, "lock-after-time"); if (xtimeout > 0 && t > server_activity + xtimeout) server_lock(); *************** *** 1203,1208 **** --- 1207,1219 ---- TAILQ_FOREACH(wp, &w->panes, entry) { if (wp->mode != NULL && wp->mode->timer != NULL) 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); } }