=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/server-client.c,v retrieving revision 1.63 retrieving revision 1.64 diff -c -r1.63 -r1.64 *** src/usr.bin/tmux/server-client.c 2012/01/21 08:40:09 1.63 --- src/usr.bin/tmux/server-client.c 2012/01/21 23:51:34 1.64 *************** *** 1,4 **** ! /* $OpenBSD: server-client.c,v 1.63 2012/01/21 08:40:09 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: server-client.c,v 1.64 2012/01/21 23:51:34 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott *************** *** 559,608 **** server_write_client(c, MSG_EXIT, &exitdata, sizeof exitdata); 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. */ --- 559,564 ----