- Timestamp:
- Sep 25, 2019 7:42:22 AM (5 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedClipboard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp
r80995 r80997 104 104 /* call this behind the lock because we don't know if the api is 105 105 thread safe and in any case we're calling several methods. */ 106 VBoxSvcClipboardLock();106 ShClSvcLock(); 107 107 vboxClipboardChanged(pCtx); 108 108 VBoxSvcClipboardUnlock(); … … 166 166 } 167 167 168 VBoxSvcClipboardLock();168 ShClSvcLock(); 169 169 170 170 pClient->State.pCtx = &g_ctx; … … 181 181 { 182 182 /* Sync the host clipboard content with the client. */ 183 VBoxSvcClipboardLock();183 ShClSvcLock(); 184 184 185 185 int rc = vboxClipboardChanged(pClient->State.pCtx); … … 192 192 int ShClSvcImplDisconnect(PSHCLCLIENT pClient) 193 193 { 194 VBoxSvcClipboardLock();194 ShClSvcLock(); 195 195 196 196 pClient->State.pCtx->pClient = NULL; … … 241 241 RT_NOREF(pCmdCtx); 242 242 243 VBoxSvcClipboardLock();243 ShClSvcLock(); 244 244 245 245 /* Default to no data available. */ … … 267 267 RT_NOREF(pCmdCtx); 268 268 269 VBoxSvcClipboardLock();269 ShClSvcLock(); 270 270 271 271 writeToPasteboard(pClient->State.pCtx->pasteboard, pData->pvData, pData->cbData, pData->uFormat); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
r80996 r80997 301 301 } 302 302 303 bool VBoxSvcClipboardLock(void)303 bool ShClSvcLock(void) 304 304 { 305 305 return RT_SUCCESS(RTCritSectEnter(&g_CritSect)); 306 306 } 307 307 308 void VBoxSvcClipboardUnlock(void)308 void ShClSvcUnlock(void) 309 309 { 310 310 int rc2 = RTCritSectLeave(&g_CritSect); … … 1063 1063 int rc = VINF_SUCCESS; 1064 1064 1065 if ( VBoxSvcClipboardLock())1065 if (ShClSvcLock()) 1066 1066 { 1067 1067 pClient->State.enmSource = enmSource; … … 1069 1069 LogFlowFunc(("Source of client %RU32 is now %RU32\n", pClient->State.uClientID, pClient->State.enmSource)); 1070 1070 1071 VBoxSvcClipboardUnlock();1071 ShClSvcUnlock(); 1072 1072 } 1073 1073
Note:
See TracChangeset
for help on using the changeset viewer.