VirtualBox

Changeset 75773 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Nov 27, 2018 2:14:41 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126975
Message:

HGCM: Added fRequestor and fRestoring to VBOXHGCMSVCFNTABLE::pfnConnect. bugref:9105

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/HGCM.cpp

    r75771 r75773  
    170170        static int LoadState(PSSMHANDLE pSSM);
    171171
    172         int CreateAndConnectClient(uint32_t *pu32ClientIdOut, uint32_t u32ClientIdIn);
     172        int CreateAndConnectClient(uint32_t *pu32ClientIdOut, uint32_t u32ClientIdIn, uint32_t fRequestor, bool fRestoring);
    173173        int DisconnectClient(uint32_t u32ClientId, bool fFromService);
    174174
     
    412412{
    413413    public:
    414         /* client identifier */
     414        /** client identifier */
    415415        uint32_t u32ClientId;
     416        /** Requestor flags. */
     417        uint32_t fRequestor;
     418        /** Set if restoring. */
     419        bool fRestoring;
    416420};
    417421
     
    434438        PPDMIHGCMPORT pHGCMPort;
    435439};
    436 
    437440
    438441class HGCMMsgCall: public HGCMMsgHeader
     
    606609                {
    607610                    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);
    609613
    610614                    hgcmObjDereference(pClient);
     
    14231427            uint32_t u32ClientId;
    14241428            rc = SSMR3GetU32(pSSM, &u32ClientId);
     1429            uint32_t fRequestor = VMMDEV_REQUESTOR_LEGACY; /** @todo save/restore fRequestor. */
    14251430            if (RT_FAILURE(rc))
    14261431            {
     
    14311436
    14321437            /* Connect the client. */
    1433             rc = pSvc->CreateAndConnectClient(NULL, u32ClientId);
     1438            rc = pSvc->CreateAndConnectClient(NULL, u32ClientId, fRequestor, true /*fRestoring*/);
    14341439            if (RT_FAILURE(rc))
    14351440            {
     
    14601465 *                        If NULL, use the given 'u32ClientIdIn' handle.
    14611466 * @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 */
     1471int 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));
    14671475
    14681476    /* Allocate a client information structure. */
     
    19801988                {
    19811989                    /* 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));
    19831994
    19841995                    /* Release the service after resolve. */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette