diff options
Diffstat (limited to 'src/VBox/HostServices')
4 files changed, 20 insertions, 12 deletions
diff --git a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp index cd850bbb8b9..4bf160cdadf 100644 --- a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp +++ b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp @@ -269,13 +269,15 @@ int ShClBackendWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFOR { RT_NOREF(pCmdCtx); + LogFlowFuncEnter(); + ShClSvcLock(); writeToPasteboard(pClient->State.pCtx->hPasteboard, pClient->State.pCtx->idGuestOwnership, pvData, cbData, fFormat); ShClSvcUnlock(); - return VINF_SUCCESS; + LogFlowFuncLeaveRC(VINF_SUCCESS); } #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS diff --git a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp index d8c889acf3b..56039afbce5 100644 --- a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp +++ b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp @@ -831,12 +831,14 @@ int ShClBackendReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, int ShClBackendWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat, void *pvData, uint32_t cbData) { + RT_NOREF(pClient, pCmdCtx, uFormat, pvData, cbData); + LogFlowFuncEnter(); - int rc = ShClSvcGuestDataReceived(pClient, pCmdCtx, uFormat, pvData, cbData); + /* Nothing to do here yet. */ - LogFlowFuncLeaveRC(rc); - return rc; + LogFlowFuncLeave(); + return VINF_SUCCESS; } #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS diff --git a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp index 54affd67c54..20e09b6b593 100644 --- a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp +++ b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp @@ -236,17 +236,14 @@ int ShClBackendReadData(PSHCLCLIENT pClient, int ShClBackendWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat, void *pvData, uint32_t cbData) { - AssertPtrReturn(pClient, VERR_INVALID_POINTER); - AssertPtrReturn(pCmdCtx, VERR_INVALID_POINTER); - AssertPtrReturn(pvData, VERR_INVALID_POINTER); + RT_NOREF(pClient, pCmdCtx, uFormat, pvData, cbData); - LogFlowFunc(("pClient=%p, pv=%p, cb=%RU32, uFormat=%02X\n", - pClient, pvData, cbData, uFormat)); + LogFlowFuncEnter(); - int rc = ShClSvcGuestDataReceived(pClient, pCmdCtx, uFormat, pvData, cbData); + /* Nothing to do here yet. */ - LogFlowFuncLeaveRC(rc); - return rc; + LogFlowFuncLeave(); + return VINF_SUCCESS; } /** diff --git a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp index f9bdeff0f6b..939350099c9 100644 --- a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp +++ b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp @@ -1726,8 +1726,15 @@ int shClSvcClientWriteData(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM rc = VINF_SUCCESS; } else + { + /* Let the backend implementation know. */ rc = ShClBackendWriteData(pClient, &cmdCtx, uFormat, pvData, cbData); + int rc2; /* Don't return internals back to the guest. */ + rc2 = ShClSvcGuestDataReceived(pClient, &cmdCtx, uFormat, pvData, cbData); /* To complete pending events, if any. */ + AssertRC(rc2); + } + LogFlowFuncLeaveRC(rc); return rc; } |