From cb1960b50c7186f0a886f4fc0acfad665243958e3f34c728ad22abb92136034e Mon Sep 17 00:00:00 2001 From: Joan Torres Date: Thu, 10 Feb 2022 12:18:53 +0000 Subject: [PATCH] - u_Fix-non-functional-MaxDisconnectionTime.patch * Backport patch that fixes issue with MaxDisconnetionTime (bsc#1195661). OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=220 --- tigervnc.changes | 7 +++ tigervnc.spec | 8 ++-- ...-non-functional-MaxDisconnectionTime.patch | 45 +++++++++++++++++++ 3 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 u_Fix-non-functional-MaxDisconnectionTime.patch diff --git a/tigervnc.changes b/tigervnc.changes index 4acf8e5..81da6aa 100644 --- a/tigervnc.changes +++ b/tigervnc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Feb 10 12:17:07 UTC 2022 - Joan Torres + +- u_Fix-non-functional-MaxDisconnectionTime.patch + * Backport patch that fixes issue with MaxDisconnetionTime + (bsc#1195661). + ------------------------------------------------------------------- Mon Nov 15 17:22:13 UTC 2021 - Stefan Dirsch diff --git a/tigervnc.spec b/tigervnc.spec index 5a81eed..ea0da04 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -1,7 +1,7 @@ # # spec file for package tigervnc # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -77,7 +77,8 @@ Patch22: U_0002-Properly-store-certificate-exceptions-in-Java-viewer.patc Patch23: n_utilize-system-crypto-policies.patch Patch24: tigervnc-FIPS-use-RFC7919.patch Patch25: u_tigervnc-211.patch -Patch26: xserver211.patch +Patch26: u_Fix-non-functional-MaxDisconnectionTime.patch +Patch27: xserver211.patch Provides: tightvnc = 1.3.9 Obsoletes: tightvnc < 1.3.9 Provides: vnc @@ -274,11 +275,12 @@ It maps common x11vnc arguments to x0vncserver arguments. %endif %patch24 -p1 %patch25 -p0 +%patch26 -p1 cp -r %{_prefix}/src/xserver/* unix/xserver/ pushd unix/xserver #patch -p1 < ../xserver120.patch -%patch26 -p1 +%patch27 -p1 popd %build diff --git a/u_Fix-non-functional-MaxDisconnectionTime.patch b/u_Fix-non-functional-MaxDisconnectionTime.patch new file mode 100644 index 0000000..1f4e31c --- /dev/null +++ b/u_Fix-non-functional-MaxDisconnectionTime.patch @@ -0,0 +1,45 @@ +From 38726ce083db1a9227325bf87989513499bfa698 Mon Sep 17 00:00:00 2001 +From: Pierre Ossman +Date: Thu, 18 Jun 2020 09:20:17 +0200 +Subject: [PATCH] Fix non-functional MaxDisconnectionTime +References: bsc#1195661 +Upstream: Merged + +Since 8e09912 this wasn't triggered properly as we checked if all +clients were gone before we actually removed the last client from our +list. +--- + common/rfb/VNCServerST.cxx | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx +index 8329bb23..35f65a2e 100644 +--- a/common/rfb/VNCServerST.cxx ++++ b/common/rfb/VNCServerST.cxx +@@ -172,11 +172,6 @@ void VNCServerST::removeSocket(network::Socket* sock) { + clipboardClient = NULL; + clipboardRequestors.remove(*ci); + +- // Adjust the exit timers +- connectTimer.stop(); +- if (rfb::Server::maxDisconnectionTime && clients.empty()) +- disconnectTimer.start(secsToMillis(rfb::Server::maxDisconnectionTime)); +- + // - Delete the per-Socket resources + delete *ci; + +@@ -193,6 +188,11 @@ void VNCServerST::removeSocket(network::Socket* sock) { + if (comparer) + comparer->logStats(); + ++ // Adjust the exit timers ++ connectTimer.stop(); ++ if (rfb::Server::maxDisconnectionTime && clients.empty()) ++ disconnectTimer.start(secsToMillis(rfb::Server::maxDisconnectionTime)); ++ + return; + } + } +-- +2.34.1 +