From 4ca2200d838732c129c6dd5c11f92245346a1e28 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 5 Oct 2009 18:30:54 +0000 Subject: 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. --- server.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server.c') diff --git a/server.c b/server.c index f7136784..b192cace 100644 --- a/server.c +++ b/server.c @@ -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); -- cgit