summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/control-notify.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-05-21 07:24:13 +0000
committernicm <nicm@openbsd.org>2020-05-21 07:24:13 +0000
commit2920028da3278b9d3a2cc48a0277cf5ea9cbac41 (patch)
treeaa5baf6257ac8429a311db1d5bb35eb4815b64cf /usr.bin/tmux/control-notify.c
parentdon't count packets in the carp protocol handling against an interface. (diff)
downloadwireguard-openbsd-2920028da3278b9d3a2cc48a0277cf5ea9cbac41.tar.xz
wireguard-openbsd-2920028da3278b9d3a2cc48a0277cf5ea9cbac41.zip
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.
Diffstat (limited to 'usr.bin/tmux/control-notify.c')
-rw-r--r--usr.bin/tmux/control-notify.c36
1 files changed, 1 insertions, 35 deletions
diff --git a/usr.bin/tmux/control-notify.c b/usr.bin/tmux/control-notify.c
index aeb6ad9adb4..6ab63d8f61c 100644
--- a/usr.bin/tmux/control-notify.c
+++ b/usr.bin/tmux/control-notify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control-notify.c,v 1.26 2020/03/16 09:12:44 nicm Exp $ */
+/* $OpenBSD: control-notify.c,v 1.27 2020/05/21 07:24:13 nicm Exp $ */
/*
* Copyright (c) 2012 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -27,40 +27,6 @@
((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)
{
struct client *c;