aboutsummaryrefslogtreecommitdiff
path: root/server-client.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-08-28 16:01:09 +0100
committerThomas Adam <thomas@xteddy.org>2015-08-28 16:01:09 +0100
commit486421ceff1b4d618d84ac3cb8c4dd9135b7960d (patch)
tree5ff6d44f3a7f1dabd9a40d0fa7a9176190a9e131 /server-client.c
parent84eabb2658f9ad1bec81344aa425f66a903c931d (diff)
parentb0940bdf5460ec3324254b5df68b5386513641b2 (diff)
downloadrtmux-486421ceff1b4d618d84ac3cb8c4dd9135b7960d.tar.gz
rtmux-486421ceff1b4d618d84ac3cb8c4dd9135b7960d.tar.bz2
rtmux-486421ceff1b4d618d84ac3cb8c4dd9135b7960d.zip
Merge branch 'obsd-master'
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/server-client.c b/server-client.c
index fab1c1a0..1faf5968 100644
--- a/server-client.c
+++ b/server-client.c
@@ -560,9 +560,7 @@ server_client_handle_key(struct client *c, int key)
/* Update the activity timer. */
if (gettimeofday(&c->activity_time, NULL) != 0)
fatal("gettimeofday failed");
- memcpy(&s->last_activity_time, &s->activity_time,
- sizeof s->last_activity_time);
- memcpy(&s->activity_time, &c->activity_time, sizeof s->activity_time);
+ session_update_activity(s, &c->activity_time);
/* Number keys jump to pane in identify mode. */
if (c->flags & CLIENT_IDENTIFY && key >= '0' && key <= '9') {
@@ -990,6 +988,7 @@ server_client_msg_dispatch(struct client *c)
struct msg_stdin_data stdindata;
const char *data;
ssize_t n, datalen;
+ struct session *s;
if ((n = imsg_read(&c->ibuf)) == -1 || n == 0)
return (-1);
@@ -1073,11 +1072,12 @@ server_client_msg_dispatch(struct client *c)
if (c->tty.fd == -1) /* exited in the meantime */
break;
+ s = c->session;
if (gettimeofday(&c->activity_time, NULL) != 0)
fatal("gettimeofday");
- if (c->session != NULL)
- session_update_activity(c->session);
+ if (s != NULL)
+ session_update_activity(s, &c->activity_time);
tty_start_tty(&c->tty);
server_redraw_client(c);