Browse Source

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.

(cherry picked from commit 331a27addf)
tags/v1.11.0
Pierre Ossman 3 years ago
parent
commit
5c00a95d8a
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      common/rfb/VNCServerST.cxx

+ 3
- 3
common/rfb/VNCServerST.cxx View File

@@ -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();

Loading…
Cancel
Save