From: Pierre Ossman Date: Fri, 21 Aug 2020 13:52:45 +0000 (+0200) Subject: Call correct wrappers for clipboard handling X-Git-Tag: v1.11.90~109 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=331a27addf46d39635fb4d195ae2f94058689832;p=tigervnc.git Call correct wrappers for clipboard handling We incorrectly called the underlying functions instead of the safe wrappers for the new clipboard functions. This had the effect of a) crashing the entire server if one of these functions failed, and b) not respecting the settings disabling the clipboard. --- diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx index 35f65a2e..f09715a4 100644 --- a/common/rfb/VNCServerST.cxx +++ b/common/rfb/VNCServerST.cxx @@ -339,7 +339,7 @@ void VNCServerST::requestClipboard() if (clipboardClient == NULL) return; - clipboardClient->requestClipboard(); + clipboardClient->requestClipboardOrClose(); } void VNCServerST::announceClipboard(bool available) @@ -353,7 +353,7 @@ void VNCServerST::announceClipboard(bool available) for (ci = clients.begin(); ci != clients.end(); ci = ci_next) { ci_next = ci; ci_next++; - (*ci)->announceClipboard(available); + (*ci)->announceClipboardOrClose(available); } } @@ -367,7 +367,7 @@ void VNCServerST::sendClipboardData(const char* data) for (ci = clipboardRequestors.begin(); ci != clipboardRequestors.end(); ci = ci_next) { ci_next = ci; ci_next++; - (*ci)->sendClipboardData(data); + (*ci)->sendClipboardDataOrClose(data); } clipboardRequestors.clear();