diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 03:34:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 03:34:56 +0000 |
commit | 671f456761fc66649260e831ceee36ec3d4ba9ca (patch) | |
tree | 033c56bded071f681e1304311ba0bff449d477cc /control.c | |
parent | Adding debian version 3.3a-5. (diff) | |
download | tmux-671f456761fc66649260e831ceee36ec3d4ba9ca.tar.xz tmux-671f456761fc66649260e831ceee36ec3d4ba9ca.zip |
Merging upstream version 3.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'control.c')
-rw-r--r-- | control.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -775,13 +775,16 @@ 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 (cs->read_event == NULL) + fatalx("out of memory"); if (c->flags & CLIENT_CONTROLCONTROL) cs->write_event = cs->read_event; else { cs->write_event = bufferevent_new(c->out_fd, NULL, control_write_callback, control_error_callback, c); + if (cs->write_event == NULL) + fatalx("out of memory"); } bufferevent_setwatermark(cs->write_event, EV_WRITE, CONTROL_BUFFER_LOW, 0); @@ -792,6 +795,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) |