mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 19:58:48 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
f7b30ed3d4
@ -775,12 +775,16 @@ control_start(struct client *c)
|
|||||||
|
|
||||||
cs->read_event = bufferevent_new(c->fd, control_read_callback,
|
cs->read_event = bufferevent_new(c->fd, control_read_callback,
|
||||||
control_write_callback, control_error_callback, c);
|
control_write_callback, control_error_callback, c);
|
||||||
|
if (cs->read_event == NULL)
|
||||||
|
fatalx("out of memory");
|
||||||
|
|
||||||
if (c->flags & CLIENT_CONTROLCONTROL)
|
if (c->flags & CLIENT_CONTROLCONTROL)
|
||||||
cs->write_event = cs->read_event;
|
cs->write_event = cs->read_event;
|
||||||
else {
|
else {
|
||||||
cs->write_event = bufferevent_new(c->out_fd, NULL,
|
cs->write_event = bufferevent_new(c->out_fd, NULL,
|
||||||
control_write_callback, control_error_callback, c);
|
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,
|
bufferevent_setwatermark(cs->write_event, EV_WRITE, CONTROL_BUFFER_LOW,
|
||||||
0);
|
0);
|
||||||
|
4
file.c
4
file.c
@ -585,6 +585,8 @@ file_write_open(struct client_files *files, struct tmuxpeer *peer,
|
|||||||
|
|
||||||
cf->event = bufferevent_new(cf->fd, NULL, file_write_callback,
|
cf->event = bufferevent_new(cf->fd, NULL, file_write_callback,
|
||||||
file_write_error_callback, cf);
|
file_write_error_callback, cf);
|
||||||
|
if (cf->event == NULL)
|
||||||
|
fatalx("out of memory");
|
||||||
bufferevent_enable(cf->event, EV_WRITE);
|
bufferevent_enable(cf->event, EV_WRITE);
|
||||||
goto reply;
|
goto reply;
|
||||||
|
|
||||||
@ -744,6 +746,8 @@ file_read_open(struct client_files *files, struct tmuxpeer *peer,
|
|||||||
|
|
||||||
cf->event = bufferevent_new(cf->fd, file_read_callback, NULL,
|
cf->event = bufferevent_new(cf->fd, file_read_callback, NULL,
|
||||||
file_read_error_callback, cf);
|
file_read_error_callback, cf);
|
||||||
|
if (cf->event == NULL)
|
||||||
|
fatalx("out of memory");
|
||||||
bufferevent_enable(cf->event, EV_READ);
|
bufferevent_enable(cf->event, EV_READ);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
2
window.c
2
window.c
@ -1043,6 +1043,8 @@ window_pane_set_event(struct window_pane *wp)
|
|||||||
|
|
||||||
wp->event = bufferevent_new(wp->fd, window_pane_read_callback,
|
wp->event = bufferevent_new(wp->fd, window_pane_read_callback,
|
||||||
NULL, window_pane_error_callback, wp);
|
NULL, window_pane_error_callback, wp);
|
||||||
|
if (wp->event == NULL)
|
||||||
|
fatalx("out of memory");
|
||||||
wp->ictx = input_init(wp, wp->event, &wp->palette);
|
wp->ictx = input_init(wp, wp->event, &wp->palette);
|
||||||
|
|
||||||
bufferevent_enable(wp->event, EV_READ|EV_WRITE);
|
bufferevent_enable(wp->event, EV_READ|EV_WRITE);
|
||||||
|
Loading…
Reference in New Issue
Block a user