From 31e3f2d530090793815d145a16a1ce3b469c4266 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 21 May 2020 07:24:13 +0000 Subject: Support code for control mode flow control: allow clients to have separate offsets (used and acknowleged) into the pane buffers; turn off reading from panes when no clients can accept the data; and add a -A flag to refresh-client to let clients turn receiving a pane on and off. --- control-notify.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'control-notify.c') diff --git a/control-notify.c b/control-notify.c index a513c147..a1735d57 100644 --- a/control-notify.c +++ b/control-notify.c @@ -26,40 +26,6 @@ #define CONTROL_SHOULD_NOTIFY_CLIENT(c) \ ((c) != NULL && ((c)->flags & CLIENT_CONTROL)) -void -control_notify_input(struct client *c, struct window_pane *wp, - const u_char *buf, size_t len) -{ - struct evbuffer *message; - u_int i; - - if (c->session == NULL) - return; - - if (c->flags & CLIENT_CONTROL_NOOUTPUT) - return; - - /* - * Only write input if the window pane is linked to a window belonging - * to the client's session. - */ - if (winlink_find_by_window(&c->session->windows, wp->window) != NULL) { - message = evbuffer_new(); - if (message == NULL) - fatalx("out of memory"); - evbuffer_add_printf(message, "%%output %%%u ", wp->id); - for (i = 0; i < len; i++) { - if (buf[i] < ' ' || buf[i] == '\\') - evbuffer_add_printf(message, "\\%03o", buf[i]); - else - evbuffer_add_printf(message, "%c", buf[i]); - } - evbuffer_add(message, "", 1); - control_write(c, "%s", EVBUFFER_DATA(message)); - evbuffer_free(message); - } -} - void control_notify_pane_mode_changed(int pane) { -- cgit v1.2.3