Changeset 92866 in vbox
- Timestamp:
- Dec 10, 2021 2:51:11 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r92822 r92866 1315 1315 } 1316 1316 1317 int GuestSession::i_dispatchToThis(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb) 1317 /** 1318 * Main handler for guest session messages from the guest. 1319 * 1320 * @returns VBox status code. 1321 * @param pCbCtx Host callback context from HGCM service. 1322 * @param pSvcCbData HGCM service callback data. 1323 * 1324 * @note No locking! 1325 */ 1326 int GuestSession::i_dispatchToThis(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData) 1318 1327 { 1319 1328 AssertPtrReturn(pCbCtx, VERR_INVALID_POINTER); 1320 AssertPtrReturn(pSvcCb, VERR_INVALID_POINTER); 1321 1322 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1329 AssertPtrReturn(pSvcCbData, VERR_INVALID_POINTER); 1323 1330 1324 1331 LogFlowThisFunc(("sessionID=%RU32, CID=%RU32, uMessage=%RU32, pSvcCb=%p\n", 1325 mData.mSession.mID, pCbCtx->uContextID, pCbCtx->uMessage, pSvcCb ));1332 mData.mSession.mID, pCbCtx->uContextID, pCbCtx->uMessage, pSvcCbData)); 1326 1333 int rc; 1327 1334 switch (pCbCtx->uMessage) … … 1334 1341 case GUEST_MSG_SESSION_NOTIFY: /* Guest Additions >= 4.3.0. */ 1335 1342 { 1336 rc = i_onSessionStatusChange(pCbCtx, pSvcCb );1343 rc = i_onSessionStatusChange(pCbCtx, pSvcCbData); 1337 1344 break; 1338 1345 } 1339 1346 1340 1347 default: 1341 rc = dispatchGeneric(pCbCtx, pSvcCb );1348 rc = dispatchGeneric(pCbCtx, pSvcCbData); 1342 1349 break; 1343 1350 } … … 1834 1841 } 1835 1842 1836 /** No locking! */ 1843 /** 1844 * Handles guest session status changes from the guest. 1845 * 1846 * @returns VBox status code. 1847 * @param pCbCtx Host callback context from HGCM service. 1848 * @param pSvcCbData HGCM service callback data. 1849 * 1850 * @note Takes the read lock (for session ID lookup). 1851 */ 1837 1852 int GuestSession::i_onSessionStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData) 1838 1853 { … … 1850 1865 vrc = HGCMSvcGetU32(&pSvcCbData->mpaParms[2], &dataCb.uResult); 1851 1866 AssertRCReturn(vrc, vrc); 1867 1868 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1852 1869 1853 1870 LogFlowThisFunc(("ID=%RU32, uType=%RU32, rcGuest=%Rrc\n", … … 1916 1933 } 1917 1934 1935 /* Leave the lock, as i_setSessionStatus() below will require a write lock for actually 1936 * committing the session state. */ 1937 alock.release(); 1938 1918 1939 if (RT_SUCCESS(vrc)) 1919 1940 { … … 2643 2664 } 2644 2665 2645 /* Does not do locking; caller is responsible for that! */ 2666 /** 2667 * Sets the guest session's current status. 2668 * 2669 * @returns VBox status code. 2670 * @param sessionStatus Session status to set. 2671 * @param sessionRc Session result to set (for error handling). 2672 * 2673 * @note Takes the write lock. 2674 */ 2646 2675 int GuestSession::i_setSessionStatus(GuestSessionStatus_T sessionStatus, int sessionRc) 2647 2676 { … … 2658 2687 else 2659 2688 AssertMsg(RT_SUCCESS(sessionRc), ("Guest rc must not be an error (%Rrc)\n", sessionRc)); 2689 2690 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 2660 2691 2661 2692 int vrc = VINF_SUCCESS; … … 2676 2707 i_guestErrorToString(sessionRc)); 2677 2708 AssertRC(rc2); 2709 2710 alock.release(); /* Release lock before firing off event. */ 2678 2711 2679 2712 ::FireGuestSessionStateChangedEvent(mEventSource, this, mData.mSession.mID, sessionStatus, errorInfo);
Note:
See TracChangeset
for help on using the changeset viewer.