diff options
author | Tiago Cunha <tcunha@gmx.com> | 2012-01-23 12:24:00 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2012-01-23 12:24:00 +0000 |
commit | a34a72d2d915d9a1f24d1643132352ce3c07f82a (patch) | |
tree | eb3cf75035aa4816f967f12ab257135e4485aa17 /server-client.c | |
parent | 4d80980e50f886fbb168db13bd04da8988f9e498 (diff) | |
download | rtmux-a34a72d2d915d9a1f24d1643132352ce3c07f82a.tar.gz rtmux-a34a72d2d915d9a1f24d1643132352ce3c07f82a.tar.bz2 rtmux-a34a72d2d915d9a1f24d1643132352ce3c07f82a.zip |
Sync OpenBSD patchset 1011:
Remove unused backoff code that doesn't do any good.
Diffstat (limited to 'server-client.c')
-rw-r--r-- | server-client.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/server-client.c b/server-client.c index 3ba4ed1f..61b864b7 100644 --- a/server-client.c +++ b/server-client.c @@ -560,50 +560,6 @@ server_client_check_exit(struct client *c) c->flags &= ~CLIENT_EXIT; } -/* - * Check if the client should backoff. During backoff, data from external - * programs is not written to the terminal. When the existing data drains, the - * client is redrawn. - * - * There are two backoff phases - both the tty and client have backoff flags - - * the first to allow existing data to drain and the latter to ensure backoff - * is disabled until the redraw has finished and prevent the redraw triggering - * another backoff. - */ -void -server_client_check_backoff(struct client *c) -{ - struct tty *tty = &c->tty; - size_t used; - - used = EVBUFFER_LENGTH(tty->event->output); - - /* - * If in the second backoff phase (redrawing), don't check backoff - * until the redraw has completed (or enough of it to drop below the - * backoff threshold). - */ - if (c->flags & CLIENT_BACKOFF) { - if (used > BACKOFF_THRESHOLD) - return; - c->flags &= ~CLIENT_BACKOFF; - return; - } - - /* Once drained, allow data through again and schedule redraw. */ - if (tty->flags & TTY_BACKOFF) { - if (used != 0) - return; - tty->flags &= ~TTY_BACKOFF; - c->flags |= (CLIENT_BACKOFF|CLIENT_REDRAWWINDOW|CLIENT_STATUS); - return; - } - - /* If too much data, start backoff. */ - if (used > BACKOFF_THRESHOLD) - tty->flags |= TTY_BACKOFF; -} - /* Check for client redraws. */ void server_client_check_redraw(struct client *c) |