Changeset 103442 in vbox for trunk/src/VBox/GuestHost
- Timestamp:
- Feb 19, 2024 1:51:37 PM (15 months ago)
- svn:sync-xref-src-repo-rev:
- 161773
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
r102955 r103442 1233 1233 pTransfer->Thread.fCancelled = false; 1234 1234 1235 int rc = shClTransferSetStatus(pTransfer, SHCLTRANSFERSTATUS_INITIALIZED); 1235 int rc = VINF_SUCCESS; 1236 if (pTransfer->Callbacks.pfnOnInitialize) 1237 rc = pTransfer->Callbacks.pfnOnInitialize(&pTransfer->CallbackCtx); 1238 1239 if (RT_SUCCESS(rc)) 1240 { 1241 /* Sanity: Make sure that the transfer we're gonna report as INITIALIZED 1242 * actually has some root entries set, as the other side can query for those at any time then. */ 1243 if (pTransfer->State.enmDir == SHCLTRANSFERDIR_TO_REMOTE) 1244 AssertMsgStmt(ShClTransferRootsCount(pTransfer), ("Transfer has no root entries set\n"), rc = VERR_WRONG_ORDER); 1245 1246 rc = shClTransferSetStatus(pTransfer, SHCLTRANSFERSTATUS_INITIALIZED); 1247 1248 if ( RT_SUCCESS(rc) 1249 && pTransfer->Callbacks.pfnOnInitialized) 1250 pTransfer->Callbacks.pfnOnInitialized(&pTransfer->CallbackCtx); 1251 } 1236 1252 1237 1253 shClTransferUnlock(pTransfer); 1238 1254 1239 if (RT_SUCCESS(rc)) 1240 { 1241 if (pTransfer->Callbacks.pfnOnInitialized) 1242 pTransfer->Callbacks.pfnOnInitialized(&pTransfer->CallbackCtx); 1243 } 1255 if (RT_FAILURE(rc)) 1256 LogRel2(("Shared Clipboard: Initialziation of transfer failed with %Rrc\n", rc)); 1244 1257 1245 1258 LogFlowFuncLeaveRC(rc); … … 1575 1588 1576 1589 SET_CALLBACK(pfnOnCreated); 1590 SET_CALLBACK(pfnOnInitialize); 1577 1591 SET_CALLBACK(pfnOnInitialized); 1578 1592 SET_CALLBACK(pfnOnDestroy); … … 1775 1789 * @returns VBox status code. 1776 1790 * @param pTransfer Clipboard transfer to read root list for. 1777 * Must be in STARTED state.1778 1791 */ 1779 1792 int ShClTransferRootListRead(PSHCLTRANSFER pTransfer) … … 1782 1795 1783 1796 LogFlowFuncEnter(); 1784 1785 #ifdef DEBUG1786 shClTransferLock(pTransfer);1787 AssertMsgReturn( pTransfer->State.enmStatus == SHCLTRANSFERSTATUS_INITIALIZED1788 || pTransfer->State.enmStatus == SHCLTRANSFERSTATUS_STARTED,1789 ("Cannot read root list in status %s\n", ShClTransferStatusToStr(pTransfer->State.enmStatus)),1790 VERR_WRONG_ORDER);1791 shClTransferUnlock(pTransfer);1792 #endif1793 1797 1794 1798 int rc;
Note:
See TracChangeset
for help on using the changeset viewer.