aboutsummaryrefslogtreecommitdiff
path: root/server-msg.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-10-11 23:30:28 +0000
committerTiago Cunha <tcunha@gmx.com>2009-10-11 23:30:28 +0000
commit91e4dc83fcfa8c2d4a318d5f23dcebbaeeea2096 (patch)
treeb5fe84fa223ed89dd3c17d43a56c7c0bb4ef93eb /server-msg.c
parenta4ea6a9d19ef9dc4290a9cd15e352a414198d268 (diff)
downloadrtmux-91e4dc83fcfa8c2d4a318d5f23dcebbaeeea2096.tar.gz
rtmux-91e4dc83fcfa8c2d4a318d5f23dcebbaeeea2096.tar.bz2
rtmux-91e4dc83fcfa8c2d4a318d5f23dcebbaeeea2096.zip
Sync OpenBSD patchset 370:
Support for individual session idle time locking. May be enabled by turning off the lock-server option (it is on by default). When this is off, each session locks when it has been idle for the lock-after-time setting. When on, the entire server locks when ALL sessions have been idle for their individual lock-after-time settings. This replaces one global-only option (lock-after-time) with another (lock-server), but the default behaviour is usually preferable so there don't seem to be many alternatives. Diff/idea largely from Thomas Adam, tweaked by me.
Diffstat (limited to 'server-msg.c')
-rw-r--r--server-msg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/server-msg.c b/server-msg.c
index 35446723..2664643d 100644
--- a/server-msg.c
+++ b/server-msg.c
@@ -1,4 +1,4 @@
-/* $Id: server-msg.c,v 1.90 2009-09-25 17:47:42 tcunha Exp $ */
+/* $Id: server-msg.c,v 1.91 2009-10-11 23:30:28 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -104,7 +104,8 @@ server_msg_dispatch(struct client *c)
tty_start_tty(&c->tty);
server_redraw_client(c);
recalculate_sizes();
- server_activity = time(NULL);
+ if (c->session != NULL)
+ c->session->activity = time(NULL);
break;
case MSG_ENVIRON:
if (datalen != sizeof environdata)
@@ -180,7 +181,8 @@ server_msg_command(struct client *c, struct msg_command_data *data)
int argc;
char **argv, *cause;
- server_activity = time(NULL);
+ if (c->session != NULL)
+ c->session->activity = time(NULL);
ctx.error = server_msg_command_error;
ctx.print = server_msg_command_print;