Changeset 47695 in vbox for trunk/src/VBox/HostServices/GuestControl/service.cpp
- Timestamp:
- Aug 13, 2013 2:40:20 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/GuestControl/service.cpp
r47621 r47695 287 287 int CopyTo(VBOXHGCMSVCPARM paDstParms[], uint32_t cDstParms) const 288 288 { 289 LogFlowFunc(("pHostCmd=%p, mMsgType=%RU32, mParmCount=%RU32, mContextID=%RU32 \n",290 this, mMsgType, mParmCount, mContextID ));289 LogFlowFunc(("pHostCmd=%p, mMsgType=%RU32, mParmCount=%RU32, mContextID=%RU32 (Session %RU32)\n", 290 this, mMsgType, mParmCount, mContextID, VBOX_GUESTCTRL_CONTEXTID_GET_SESSION(mContextID))); 291 291 292 292 int rc = VINF_SUCCESS; … … 478 478 : mSvcHelpers(NULL), 479 479 mID(0), 480 mFlags(0), mContextFilter(0), 480 mFlags(0), 481 mFilterMask(0), mFilterValue(0), 481 482 mHostCmdRc(VINF_SUCCESS), mHostCmdTries(0), 482 483 mHostCmdTS(0), … … 487 488 : mSvcHelpers(pSvcHelpers), 488 489 mID(uClientID), 489 mFlags(0), mContextFilter(0), 490 mFlags(0), 491 mFilterMask(0), mFilterValue(0), 490 492 mHostCmdRc(VINF_SUCCESS), mHostCmdTries(0), 491 493 mHostCmdTS(0), … … 571 573 if (mFlags & CLIENTSTATE_FLAG_CONTEXTFILTER) 572 574 { 573 fWant = 574 (pHostCmd->mContextID & mContextFilter) == pHostCmd->mContextID; 575 fWant = (pHostCmd->mContextID & mFilterMask) == mFilterValue; 575 576 } 576 577 else /* Client is interested in all commands. */ 577 578 fWant = true; 578 579 579 LogFlowFunc(("[Client %RU32] mFlags=0x%x, mContextID=%RU32 (session %RU32), m ContextFilter=0x%x, fWant=%RTbool\n",580 LogFlowFunc(("[Client %RU32] mFlags=0x%x, mContextID=%RU32 (session %RU32), mFilterMask=0x%x, mFilterValue=%RU32, fWant=%RTbool\n", 580 581 mID, mFlags, pHostCmd->mContextID, 581 582 VBOX_GUESTCTRL_CONTEXTID_GET_SESSION(pHostCmd->mContextID), 582 m ContextFilter, fWant));583 mFilterMask, mFilterValue, fWant)); 583 584 584 585 return fWant; … … 831 832 /** Client flags. @sa CLIENTSTATE_FLAG_ flags. */ 832 833 uint32_t mFlags; 833 /** The context ID filter, based on the flags set. */ 834 uint32_t mContextFilter; 834 /** The context ID filter mask, if any. */ 835 uint32_t mFilterMask; 836 /** The context ID filter value, if any. */ 837 uint32_t mFilterValue; 835 838 /** Host command list to process. */ 836 839 HostCmdList mHostCmdList; … … 1152 1155 return VERR_NOT_FOUND; /* Should never happen. */ 1153 1156 1154 if (cParms != 3)1157 if (cParms != 4) 1155 1158 return VERR_INVALID_PARAMETER; 1156 1159 1157 uint32_t u MaskAdd, uMaskRemove;1158 int rc = paParms[0].getUInt32(&u MaskAdd);1160 uint32_t uValue, uMaskAdd, uMaskRemove; 1161 int rc = paParms[0].getUInt32(&uValue); 1159 1162 if (RT_SUCCESS(rc)) 1160 rc = paParms[1].getUInt32(&uMaskRemove); 1163 rc = paParms[1].getUInt32(&uMaskAdd); 1164 if (RT_SUCCESS(rc)) 1165 rc = paParms[2].getUInt32(&uMaskRemove); 1166 /** @todo paParm[3] (flags) not used yet. */ 1161 1167 if (RT_SUCCESS(rc)) 1162 1168 { … … 1165 1171 clientState.mFlags |= CLIENTSTATE_FLAG_CONTEXTFILTER; 1166 1172 if (uMaskAdd) 1167 clientState.m ContextFilter|= uMaskAdd;1173 clientState.mFilterMask |= uMaskAdd; 1168 1174 if (uMaskRemove) 1169 clientState.mContextFilter &= ~uMaskRemove; 1170 1171 LogFlowFunc(("[Client %RU32] Setting message filter=0x%x set (flags=0x%x, maskAdd=0x%x, maskRemove=0x%x)\n", 1172 u32ClientID, clientState.mContextFilter, clientState.mFlags, 1173 uMaskAdd, uMaskRemove)); 1175 clientState.mFilterMask &= ~uMaskRemove; 1176 1177 clientState.mFilterValue = uValue; 1178 1179 LogFlowFunc(("[Client %RU32] Setting message filterMask=0x%x, filterVal=%RU32 set (flags=0x%x, maskAdd=0x%x, maskRemove=0x%x)\n", 1180 u32ClientID, clientState.mFilterMask, clientState.mFilterValue, 1181 clientState.mFlags, uMaskAdd, uMaskRemove)); 1174 1182 } 1175 1183 … … 1196 1204 1197 1205 clientState.mFlags &= ~CLIENTSTATE_FLAG_CONTEXTFILTER; 1198 clientState.mContextFilter = 0; 1206 clientState.mFilterMask = 0; 1207 clientState.mFilterValue = 0; 1199 1208 1200 1209 LogFlowFunc(("[Client %RU32} Unset message filter\n", u32ClientID));
Note:
See TracChangeset
for help on using the changeset viewer.