VirtualBox

Changeset 55592 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
May 2, 2015 2:36:57 AM (10 years ago)
Author:
vboxsync
Message:

Sketched out how the base environment would be received by the guest session code.

File:
1 edited

Legend:

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

    r55591 r55592  
    325325    if (mData.mpBaseEnvironment)
    326326    {
    327         GuestEnvironment *pBaseEnv = unconst(mData.mpBaseEnvironment);
     327        mData.mpBaseEnvironment->releaseConst();
    328328        mData.mpBaseEnvironment = NULL;
    329         pBaseEnv->release();
    330329    }
    331330
     
    15711570        case GUEST_SESSION_NOTIFYTYPE_STARTED:
    15721571            sessionStatus = GuestSessionStatus_Started;
     1572#if 0 /** @todo If we get some environment stuff along with this kind notification: */
     1573            const char *pszzEnvBlock = ...;
     1574            uint32_t    cbEnvBlock   = ...;
     1575            if (!mData.mpBaseEnvironment)
     1576            {
     1577                GuestEnvironment *pBaseEnv;
     1578                try { pBaseEnv = new GuestEnvironment(); } catch (std::bad_alloc &) { pBaseEnv = NULL; }
     1579                if (pBaseEnv)
     1580                {
     1581                    int vrc = pBaseEnv->initNormal();
     1582                    if (RT_SUCCESS(vrc))
     1583                        vrc = pBaseEnv->copyUtf8Block(pszzEnvBlock, cbEnvBlock);
     1584                    if (RT_SUCCESS(vrc))
     1585                        mData.mpBaseEnvironment = pBaseEnv;
     1586                    else
     1587                        pBaseEnv->release();
     1588                }
     1589            }
     1590#endif
    15731591            break;
    15741592
Note: See TracChangeset for help on using the changeset viewer.

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