Date: Wed, 26 Jun 2019 17:41:38 +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-12@freebsd.org Subject: svn commit: r349434 - stable/12/usr.sbin/bhyve Message-ID: <201906261741.x5QHfcge088501@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Wed Jun 26 17:41:38 2019 New Revision: 349434 URL: https://svnweb.freebsd.org/changeset/base/349434 Log: MFC r349196: Make zlib encoding messages idempotent. PR: 238333 Modified: stable/12/usr.sbin/bhyve/rfb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/rfb.c ============================================================================== --- stable/12/usr.sbin/bhyve/rfb.c Wed Jun 26 17:38:38 2019 (r349433) +++ stable/12/usr.sbin/bhyve/rfb.c Wed Jun 26 17:41:38 2019 (r349434) @@ -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?201906261741.x5QHfcge088501>