Changeset 86691 in vbox for trunk/src/VBox
- Timestamp:
- Oct 23, 2020 2:55:35 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
r85983 r86691 277 277 * @param pCtx Request context information. 278 278 * @param rcCompletion The completion status of the request. 279 * @param pReq Request to complete. 279 * @param pReq Request to complete. Will be free'd by the callback. 280 280 * @param pv Address of data from completed request. Optional. 281 281 * @param cb Size (in bytes) of data from completed request. Optional. … … 286 286 CLIPREADCBREQ *pReq, void *pv, uint32_t cb) 287 287 { 288 AssertPtrReturnVoid(pCtx); 288 289 RT_NOREF(rcCompletion); 290 AssertPtrReturnVoid(pReq); 289 291 290 292 LogFlowFunc(("rcCompletion=%Rrc, pReq=%p, pv=%p, cb=%RU32, idEvent=%RU32\n", rcCompletion, pReq, pv, cb, pReq->idEvent)); 291 293 292 AssertMsgRC(rcCompletion, ("Clipboard data completion from X11 failed with %Rrc\n", rcCompletion));293 294 294 if (pReq->idEvent != NIL_SHCLEVENTID) 295 295 { … … 297 297 298 298 PSHCLEVENTPAYLOAD pPayload = NULL; 299 if (pv && cb) 299 if ( RT_SUCCESS(rcCompletion) 300 && pv 301 && cb) 300 302 { 301 303 rc2 = ShClPayloadAlloc(pReq->idEvent, pv, cb, &pPayload); … … 303 305 } 304 306 305 RTCritSectEnter(&pCtx->pClient->CritSect); 306 rc2 = ShClEventSignal(&pCtx->pClient->EventSrc, pReq->idEvent, pPayload); 307 AssertRC(rc2); 308 RTCritSectLeave(&pCtx->pClient->CritSect); 309 } 310 311 RTMemFree(pReq); 307 rc2 = RTCritSectEnter(&pCtx->pClient->CritSect); 308 if (RT_SUCCESS(rc2)) 309 { 310 ShClEventSignal(&pCtx->pClient->EventSrc, pReq->idEvent, pPayload); 311 /* Note: Skip checking if signalling the event is successful, as it could be gone already by now. */ 312 RTCritSectLeave(&pCtx->pClient->CritSect); 313 } 314 } 315 316 if (pReq) 317 RTMemFree(pReq); 312 318 } 313 319
Note:
See TracChangeset
for help on using the changeset viewer.