From 67e70770c8c29df3e92634132401739531f94ff9 Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Fri, 8 Jul 2011 22:58:30 +0000 Subject: [PATCH] Sync OpenBSD patchset 936: Do not continue to send data to suspended/locked clients or there will be a huge rush of it after they are resumed/unlocked. The main output path was fine but status line updates and the terminal state reset code were missed. --- screen-redraw.c | 6 +++++- server-client.c | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/screen-redraw.c b/screen-redraw.c index 686d805a..a12fa365 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -1,4 +1,4 @@ -/* $Id: screen-redraw.c,v 1.53 2010-09-18 15:43:53 tcunha Exp $ */ +/* $Id$ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -176,6 +176,10 @@ screen_redraw_screen(struct client *c, int status_only, int borders_only) u_int i, j, type; int status, fg, bg; + /* Suspended clients should not be updated. */ + if (c->flags & CLIENT_SUSPENDED) + return; + /* Get status line, er, status. */ if (c->message_string != NULL || c->prompt_string != NULL) status = 1; diff --git a/server-client.c b/server-client.c index 805b1ca7..badbe1be 100644 --- a/server-client.c +++ b/server-client.c @@ -1,4 +1,4 @@ -/* $Id: server-client.c,v 1.62 2011-05-22 16:25:02 tcunha Exp $ */ +/* $Id$ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -473,6 +473,9 @@ server_client_reset_state(struct client *c) struct options *wo = &w->options; int status, mode; + if (c->flags & CLIENT_SUSPENDED) + return; + tty_region(&c->tty, 0, c->tty.sy - 1); status = options_get_number(oo, "status");