From 185afec67912b472c2285fe9f9c5fb8d0a23b059 Mon Sep 17 00:00:00 2001 From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Thu, 28 May 2020 11:04:03 +0100 Subject: [PATCH] Send response for refused SetDesktopSize Sends response for SetDesktopSize as per the community wiki specification --- common/rfb/VNCSConnectionST.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx index 5d2d4b13..9b5ead9f 100644 --- a/common/rfb/VNCSConnectionST.cxx +++ b/common/rfb/VNCSConnectionST.cxx @@ -653,10 +653,11 @@ void VNCSConnectionST::setDesktopSize(int fb_width, int fb_height, { unsigned int result; - if (!accessCheck(AccessSetDesktopSize)) return; - if (!rfb::Server::acceptSetDesktopSize) return; + if (!accessCheck(AccessSetDesktopSize) || !rfb::Server::acceptSetDesktopSize) + result = resultProhibited; + else + result = server->setDesktopSize(this, fb_width, fb_height, layout); - result = server->setDesktopSize(this, fb_width, fb_height, layout); writer()->writeDesktopSize(reasonClient, result); } -- 2.39.5