diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-11-04 22:42:31 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-11-04 22:42:31 +0000 |
commit | bbad75fb6c7344528c7f631c2daf09a87bab9744 (patch) | |
tree | 48af262594e7f29771a57f1a40b20702821f4b57 /server.c | |
parent | a090b78e8d5bf43a92d52e8e24b6566ff542c88e (diff) | |
download | rtmux-bbad75fb6c7344528c7f631c2daf09a87bab9744.tar.gz rtmux-bbad75fb6c7344528c7f631c2daf09a87bab9744.tar.bz2 rtmux-bbad75fb6c7344528c7f631c2daf09a87bab9744.zip |
Sync OpenBSD patchset 483:
Change session and client activity and creation time members to have more
meaningful names.
Also, remove the code to try and update the session activity time for the
command client when a command message is received as is pointless because it
des not have a session.
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $Id: server.c,v 1.215 2009-11-02 21:39:34 tcunha Exp $ */ +/* $Id: server.c,v 1.216 2009-11-04 22:42:31 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -568,12 +568,13 @@ server_lock_server(void) continue; if (s->flags & SESSION_UNATTACHED) { - s->activity = time(NULL); + if (gettimeofday(&s->activity_time, NULL) != 0) + fatal("gettimeofday failed"); continue; } timeout = options_get_number(&s->options, "lock-after-time"); - if (timeout <= 0 || t <= s->activity + timeout) + if (timeout <= 0 || t <= s->activity_time.tv_sec + timeout) return; /* not timed out */ } @@ -596,12 +597,13 @@ server_lock_sessions(void) continue; if (s->flags & SESSION_UNATTACHED) { - s->activity = time(NULL); + if (gettimeofday(&s->activity_time, NULL) != 0) + fatal("gettimeofday failed"); continue; } timeout = options_get_number(&s->options, "lock-after-time"); - if (timeout > 0 && t > s->activity + timeout) { + if (timeout > 0 && t > s->activity_time.tv_sec + timeout) { server_lock_session(s); recalculate_sizes(); } |