diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-10-05 18:30:54 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-10-05 18:30:54 +0000 |
commit | 4ca2200d838732c129c6dd5c11f92245346a1e28 (patch) | |
tree | 44096997d5b3b2d20ef12f24f37a627a99a5e747 /server.c | |
parent | 45043ebf3ecabb8847d404baa7b3e9d66696f667 (diff) | |
download | rtmux-4ca2200d838732c129c6dd5c11f92245346a1e28.tar.gz rtmux-4ca2200d838732c129c6dd5c11f92245346a1e28.tar.bz2 rtmux-4ca2200d838732c129c6dd5c11f92245346a1e28.zip |
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 | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -90,6 +90,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); |