aboutsummaryrefslogtreecommitdiff
path: root/server-client.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-12-19 16:01:20 +0000
committerThomas Adam <thomas@xteddy.org>2017-12-19 16:01:20 +0000
commit74ecc866cf7613a3af10f400b4d59c12200d38c5 (patch)
tree35f7f43d8e254e60552aa8170d33d32f8f2adf40 /server-client.c
parent641a885af81c3dd16f72afc2122b8a4945d61e0f (diff)
parentb20a00f93e00d73786a2bf00bd8cecb8c5392e89 (diff)
downloadrtmux-74ecc866cf7613a3af10f400b4d59c12200d38c5.tar.gz
rtmux-74ecc866cf7613a3af10f400b4d59c12200d38c5.tar.bz2
rtmux-74ecc866cf7613a3af10f400b4d59c12200d38c5.zip
Merge branch 'obsd-master'
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/server-client.c b/server-client.c
index 775c90a6..e144716a 100644
--- a/server-client.c
+++ b/server-client.c
@@ -159,7 +159,7 @@ server_client_is_default_key_table(struct client *c, struct key_table *table)
}
/* Create a new client. */
-void
+struct client *
server_client_create(int fd)
{
struct client *c;
@@ -212,6 +212,7 @@ server_client_create(int fd)
TAILQ_INSERT_TAIL(&clients, c, entry);
log_debug("new client %p", c);
+ return (c);
}
/* Open client terminal if needed. */
@@ -1560,6 +1561,9 @@ server_client_dispatch_command(struct client *c, struct imsg *imsg)
int argc;
char **argv, *cause;
+ if (c->flags & CLIENT_EXIT)
+ return;
+
if (imsg->hdr.len - IMSG_HEADER_SIZE < sizeof data)
fatalx("bad MSG_COMMAND size");
memcpy(&data, imsg->data, sizeof data);