VirtualBox

Ignore:
Timestamp:
Mar 12, 2013 5:47:56 PM (12 years ago)
Author:
vboxsync
Message:

GuestCtrl: More code for guest session infrastructure handling (untested, work in progress).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/GuestControl/service.cpp

    r44935 r45010  
    459459{
    460460    ClientState(void)
    461         : mSvcHelpers(NULL), 
    462           mFlags(0), mContextFilter(0), 
     461        : mSvcHelpers(NULL),
     462          mFlags(0), mContextFilter(0),
    463463          mpHostCmd(NULL), mHostCmdRc(VINF_SUCCESS), mHostCmdTries(0),
    464464          mIsPending(false) {}
    465465
    466466    ClientState(PVBOXHGCMSVCHELPERS pSvcHelpers)
    467         : mSvcHelpers(pSvcHelpers), 
    468           mFlags(0), mContextFilter(0), 
     467        : mSvcHelpers(pSvcHelpers),
     468          mFlags(0), mContextFilter(0),
    469469          mpHostCmd(NULL), mHostCmdRc(VINF_SUCCESS), mHostCmdTries(0),
    470470          mIsPending(false) {}
     
    474474        AssertPtrReturn(pHostCmd, false);
    475475
     476#ifdef DEBUG_andy
     477            LogFlowFunc(("mFlags=%x, mContextID=%RU32, mContextFilter=%x, filterRes=%x\n",
     478                         mFlags, pHostCmd->mContextID, mContextFilter, pHostCmd->mContextID & mContextFilter));
     479#endif
    476480        /*
    477481         * If a sesseion filter is set, only obey those sessions we're interested in.
     
    479483        if (mFlags & CLIENTSTATE_FLAG_CONTEXTFILTER)
    480484        {
    481             if (VBOX_GUESTCTRL_CONTEXTID_GET_SESSION(pHostCmd->mContextID) == mContextFilter)
     485            if ((pHostCmd->mContextID & mContextFilter) == mContextFilter)
    482486                return true;
    483487        }
     
    11131117        return VERR_INVALID_PARAMETER;
    11141118
    1115     uint32_t uMaskAdd;
     1119    uint32_t uMaskAdd, uMaskRemove;
    11161120    int rc = paParms[0].getUInt32(&uMaskAdd);
    11171121    if (RT_SUCCESS(rc))
     1122        rc = paParms[1].getUInt32(&uMaskRemove);
     1123    if (RT_SUCCESS(rc))
    11181124    {
    11191125        /* paParms[1] unused yet. */
     
    11221128
    11231129        clientState.mFlags |= CLIENTSTATE_FLAG_CONTEXTFILTER;
    1124         clientState.mContextFilter = uMaskAdd;
    1125 
    1126         LogFlowFunc(("Client ID=%RU32 now has filter=%x enabled (flags=%x)\n",
    1127                      u32ClientID, clientState.mContextFilter, clientState.mFlags));
     1130        if (uMaskAdd)
     1131            clientState.mContextFilter |= uMaskAdd;
     1132        if (uMaskRemove)
     1133            clientState.mContextFilter &= ~uMaskRemove;
     1134
     1135        LogFlowFunc(("Client ID=%RU32 now has filter=%x enabled (flags=%x, maskAdd=%x, maskRemove=%x)\n",
     1136                     u32ClientID, clientState.mContextFilter, clientState.mFlags,
     1137                     uMaskAdd, uMaskRemove));
    11281138    }
    11291139
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