summaryrefslogtreecommitdiffstats
path: root/control.c
diff options
context:
space:
mode:
authornicm <nicm>2022-07-06 08:31:59 +0000
committernicm <nicm>2022-07-06 08:31:59 +0000
commit9e03df5500f802e0a10d52bfaf51eab493b84c70 (patch)
tree46bc7071722281a34855aaedb6ee2377045b8935 /control.c
parentdd602eaa61e82188313b9187021accab260f89c0 (diff)
Defer reading from control client until the command line command has
completed.
Diffstat (limited to 'control.c')
-rw-r--r--control.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/control.c b/control.c
index 359d0e78..f75035ef 100644
--- a/control.c
+++ b/control.c
@@ -776,7 +776,6 @@ control_start(struct client *c)
cs->read_event = bufferevent_new(c->fd, control_read_callback,
control_write_callback, control_error_callback, c);
- bufferevent_enable(cs->read_event, EV_READ);
if (c->flags & CLIENT_CONTROLCONTROL)
cs->write_event = cs->read_event;
@@ -793,6 +792,13 @@ control_start(struct client *c)
}
}
+/* Control client ready. */
+void
+control_ready(struct client *c)
+{
+ bufferevent_enable(c->control_state->read_event, EV_READ);
+}
+
/* Discard all output for a client. */
void
control_discard(struct client *c)