diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-10-06 14:00:50 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-10-06 14:00:50 +0000 |
commit | eb7f8b6d33e99d7dde9a6b128552f4a9c96836d6 (patch) | |
tree | d58dee116f51df1d66232daa209e86649e8a3eff /server.c | |
parent | d8c0634524b3cbd0789ce1535e9984541d740b11 (diff) | |
download | rtmux-eb7f8b6d33e99d7dde9a6b128552f4a9c96836d6.tar.gz rtmux-eb7f8b6d33e99d7dde9a6b128552f4a9c96836d6.tar.bz2 rtmux-eb7f8b6d33e99d7dde9a6b128552f4a9c96836d6.zip |
Sync OpenBSD patchset 360:
If no target client is specified to commands which accept one, try to guess the
current client, in a similar manner to how sessions already work: if the
current session can be established and has only one client, use that; otherwise
use the most recently created client.
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: server.c,v 1.194 2009-09-25 17:47:42 tcunha Exp $ */ +/* $Id: server.c,v 1.195 2009-10-06 14:00:50 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -89,6 +89,9 @@ server_create_client(int fd) c = xcalloc(1, sizeof *c); c->references = 0; imsg_init(&c->ibuf, fd); + + if (gettimeofday(&c->tv, NULL) != 0) + fatal("gettimeofday failed"); ARRAY_INIT(&c->prompt_hdata); |