summaryrefslogtreecommitdiffstats
path: root/server-client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-01-01 01:12:09 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-01-01 01:12:09 +0000
commit04b32fa734d491e7ae9b915dc309858310d96185 (patch)
tree877284af9511a2c46a1f9a949ca6cbab3184a0be /server-client.c
parent91218f8714dafa83f49ece4435cc3d26a738a02e (diff)
Don't reset the activity timer for unattached sessions every second,
this screws up the choice of most-recently-used. Instead, break the time update into a little function and do it when the session is attached. Pointed out by joshe@.
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/server-client.c b/server-client.c
index 31ea99f5..76f8d3a8 100644
--- a/server-client.c
+++ b/server-client.c
@@ -761,11 +761,8 @@ server_client_msg_dispatch(struct client *c)
if (gettimeofday(&c->activity_time, NULL) != 0)
fatal("gettimeofday");
- if (c->session != NULL) {
- memcpy(&c->session->activity_time,
- &c->activity_time,
- sizeof c->session->activity_time);
- }
+ if (c->session != NULL)
+ session_update_activity(c->session);
tty_start_tty(&c->tty);
server_redraw_client(c);