瀏覽代碼

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…
取消
儲存