Преглед на файлове

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 години
родител
ревизия
5c00a95d8a
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3
    3
      common/rfb/VNCServerST.cxx

+ 3
- 3
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();

Loading…
Отказ
Запис