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.
if (clipboardClient == NULL)
return;
- clipboardClient->requestClipboard();
+ clipboardClient->requestClipboardOrClose();
}
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);
}
}
for (ci = clipboardRequestors.begin();
ci != clipboardRequestors.end(); ci = ci_next) {
ci_next = ci; ci_next++;
- (*ci)->sendClipboardData(data);
+ (*ci)->sendClipboardDataOrClose(data);
}
clipboardRequestors.clear();