Changeset 75773 in vbox for trunk/src/VBox/Main
- Timestamp:
- Nov 27, 2018 2:14:41 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126975
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/HGCM.cpp
r75771 r75773 170 170 static int LoadState(PSSMHANDLE pSSM); 171 171 172 int CreateAndConnectClient(uint32_t *pu32ClientIdOut, uint32_t u32ClientIdIn );172 int CreateAndConnectClient(uint32_t *pu32ClientIdOut, uint32_t u32ClientIdIn, uint32_t fRequestor, bool fRestoring); 173 173 int DisconnectClient(uint32_t u32ClientId, bool fFromService); 174 174 … … 412 412 { 413 413 public: 414 /* client identifier */414 /** client identifier */ 415 415 uint32_t u32ClientId; 416 /** Requestor flags. */ 417 uint32_t fRequestor; 418 /** Set if restoring. */ 419 bool fRestoring; 416 420 }; 417 421 … … 434 438 PPDMIHGCMPORT pHGCMPort; 435 439 }; 436 437 440 438 441 class HGCMMsgCall: public HGCMMsgHeader … … 606 609 { 607 610 rc = pSvc->m_fntable.pfnConnect(pSvc->m_fntable.pvService, pMsg->u32ClientId, 608 HGCM_CLIENT_DATA(pSvc, pClient)); 611 HGCM_CLIENT_DATA(pSvc, pClient), 612 pMsg->fRequestor, pMsg->fRestoring); 609 613 610 614 hgcmObjDereference(pClient); … … 1423 1427 uint32_t u32ClientId; 1424 1428 rc = SSMR3GetU32(pSSM, &u32ClientId); 1429 uint32_t fRequestor = VMMDEV_REQUESTOR_LEGACY; /** @todo save/restore fRequestor. */ 1425 1430 if (RT_FAILURE(rc)) 1426 1431 { … … 1431 1436 1432 1437 /* Connect the client. */ 1433 rc = pSvc->CreateAndConnectClient(NULL, u32ClientId );1438 rc = pSvc->CreateAndConnectClient(NULL, u32ClientId, fRequestor, true /*fRestoring*/); 1434 1439 if (RT_FAILURE(rc)) 1435 1440 { … … 1460 1465 * If NULL, use the given 'u32ClientIdIn' handle. 1461 1466 * @param u32ClientIdIn The handle for the client, when 'pu32ClientIdOut' is NULL. 1462 * @return VBox rc. 1463 */ 1464 int HGCMService::CreateAndConnectClient(uint32_t *pu32ClientIdOut, uint32_t u32ClientIdIn) 1465 { 1466 LogFlowFunc(("pu32ClientIdOut = %p, u32ClientIdIn = %d\n", pu32ClientIdOut, u32ClientIdIn)); 1467 * @param fRequestor The requestor flags, VMMDEV_REQUESTOR_LEGACY if not available. 1468 * @param fRestoring Set if we're restoring a saved state. 1469 * @return VBox status code. 1470 */ 1471 int HGCMService::CreateAndConnectClient(uint32_t *pu32ClientIdOut, uint32_t u32ClientIdIn, uint32_t fRequestor, bool fRestoring) 1472 { 1473 LogFlowFunc(("pu32ClientIdOut = %p, u32ClientIdIn = %d, fRequestor = %#x, fRestoring = %d\n", 1474 pu32ClientIdOut, u32ClientIdIn, fRequestor, fRestoring)); 1467 1475 1468 1476 /* Allocate a client information structure. */ … … 1980 1988 { 1981 1989 /* Call the service instance method. */ 1982 rc = pService->CreateAndConnectClient(pMsg->pu32ClientId, 0); 1990 rc = pService->CreateAndConnectClient(pMsg->pu32ClientId, 1991 0, 1992 pMsg->pHGCMPort->pfnGetRequestor(pMsg->pHGCMPort, pMsg->pCmd), 1993 pMsg->pHGCMPort->pfnIsCmdRestored(pMsg->pHGCMPort, pMsg->pCmd)); 1983 1994 1984 1995 /* Release the service after resolve. */
Note:
See TracChangeset
for help on using the changeset viewer.