Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jun 2019 17:42:47 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r349435 - stable/11/usr.sbin/bhyve
Message-ID:  <201906261742.x5QHglDw089564@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Wed Jun 26 17:42:47 2019
New Revision: 349435
URL: https://svnweb.freebsd.org/changeset/base/349435

Log:
  MFC r349196:
  Make zlib encoding messages idempotent.
  
  PR:	238333

Modified:
  stable/11/usr.sbin/bhyve/rfb.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/bhyve/rfb.c
==============================================================================
--- stable/11/usr.sbin/bhyve/rfb.c	Wed Jun 26 17:41:38 2019	(r349434)
+++ stable/11/usr.sbin/bhyve/rfb.c	Wed Jun 26 17:42:47 2019	(r349435)
@@ -270,8 +270,10 @@ rfb_recv_set_encodings_msg(struct rfb_softc *rc, int c
 			rc->enc_raw_ok = true;
 			break;
 		case RFB_ENCODING_ZLIB:
-			rc->enc_zlib_ok = true;
-			deflateInit(&rc->zstream, Z_BEST_SPEED);
+			if (!rc->enc_zlib_ok) {
+				deflateInit(&rc->zstream, Z_BEST_SPEED);
+				rc->enc_zlib_ok = true;
+			}
 			break;
 		case RFB_ENCODING_RESIZE:
 			rc->enc_resize_ok = true;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906261742.x5QHglDw089564>