Changeset 47695 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Aug 13, 2013 2:40:20 PM (11 years ago)
- Location:
- trunk/src/VBox/Additions/common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
r47620 r47695 138 138 * @return IPRT status code. 139 139 * @param uClientId The client ID returned by VbglR3GuestCtrlConnect(). 140 * @param uFilterAdd Context ID filter mask to add. 141 * @param uFilterRemove Context ID filter mask to remove. 142 */ 143 VBGLR3DECL(int) VbglR3GuestCtrlMsgFilterSet(uint32_t uClientId, 144 uint32_t uFilterAdd, uint32_t uFilterRemove) 140 * @param uValue The value to filter messages for. 141 * @param uMaskAdd Filter mask to add. 142 * @param uMaskRemove Filter mask to remove. 143 */ 144 VBGLR3DECL(int) VbglR3GuestCtrlMsgFilterSet(uint32_t uClientId, uint32_t uValue, 145 uint32_t uMaskAdd, uint32_t uMaskRemove) 145 146 { 146 147 HGCMMsgCmdFilterSet Msg; … … 149 150 Msg.hdr.u32ClientID = uClientId; 150 151 Msg.hdr.u32Function = GUEST_MSG_FILTER_SET; /* Tell the host we want to set a filter. */ 151 Msg.hdr.cParms = 3; 152 153 VbglHGCMParmUInt32Set(&Msg.add, uFilterAdd); 154 VbglHGCMParmUInt32Set(&Msg.remove, uFilterRemove); 152 Msg.hdr.cParms = 4; 153 154 VbglHGCMParmUInt32Set(&Msg.value, uValue); 155 VbglHGCMParmUInt32Set(&Msg.mask_add, uMaskAdd); 156 VbglHGCMParmUInt32Set(&Msg.mask_remove, uMaskRemove); 155 157 VbglHGCMParmUInt32Set(&Msg.flags, 0 /* Flags, unused */); 156 158 -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlProcess.cpp
r47622 r47695 1442 1442 /* The process thread is not interested in receiving any commands; 1443 1443 * tell the host service. */ 1444 rc = VbglR3GuestCtrlMsgFilterSet(pProcess->uClientID, 0 /* Skip all */, 0); 1444 rc = VbglR3GuestCtrlMsgFilterSet(pProcess->uClientID, 0 /* Skip all */, 1445 0 /* Filter mask to add */, 0 /* Filter mask to remove */); 1445 1446 if (RT_FAILURE(rc)) 1446 1447 { -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp
r47622 r47695 911 911 912 912 /** 913 * Thread main routine for a forked guest session . This914 * thread runs in the main executable to control the forked913 * Thread main routine for a forked guest session process. 914 * This thread runs in the main executable to control the forked 915 915 * session process. 916 916 * … … 936 936 /* The session thread is not interested in receiving any commands; 937 937 * tell the host service. */ 938 rc = VbglR3GuestCtrlMsgFilterSet(uClientID, 0 /* Skip all */, 0); 938 rc = VbglR3GuestCtrlMsgFilterSet(uClientID, 0 /* Skip all */, 939 0 /* Filter mask to add */, 0 /* Filter mask to remove */); 939 940 if (RT_FAILURE(rc)) 940 941 { 941 942 VBoxServiceError("Unable to set message filter, rc=%Rrc\n", rc); 942 943 /* Non-critical. */ 944 rc = VINF_SUCCESS; 943 945 } 944 946 } 945 947 else 946 {947 948 VBoxServiceError("Error connecting to guest control service, rc=%Rrc\n", rc); 948 return rc; 949 } 950 951 /* Let caller know that we're done initializing. */ 952 rc = RTThreadUserSignal(RTThreadSelf()); 949 950 if (RT_FAILURE(rc)) 951 pThread->fShutdown = true; 952 953 /* Let caller know that we're done initializing, regardless of the result. */ 954 int rc2 = RTThreadUserSignal(RTThreadSelf()); 955 AssertRC(rc2); 956 953 957 if (RT_FAILURE(rc)) 954 958 return rc; … … 1069 1073 Assert(uSessionStatus != GUEST_SESSION_NOTIFYTYPE_UNDEFINED); 1070 1074 VBGLR3GUESTCTRLCMDCTX ctx = { uClientID, VBOX_GUESTCTRL_CONTEXTID_MAKE_SESSION(uSessionID) }; 1071 intrc2 = VbglR3GuestCtrlSessionNotify(&ctx,1072 1075 rc2 = VbglR3GuestCtrlSessionNotify(&ctx, 1076 uSessionStatus, uSessionRc); 1073 1077 if (RT_FAILURE(rc2)) 1074 1078 VBoxServiceError("Reporting session ID=%RU32 final status failed with rc=%Rrc\n", … … 1100 1104 * session we don't want to handle. */ 1101 1105 uint32_t uFilterAdd = 1102 VBOX_GUESTCTRL_ CONTEXTID_MAKE_SESSION(pSession->StartupInfo.uSessionID);1103 uFilterAdd |= 0x7FFFFFF; /* We only want to filter for session IDs. */1104 1105 rc = VbglR3GuestCtrlMsgFilterSet(uClientID,uFilterAdd, 0 /* Filter remove */);1106 VBOX_GUESTCTRL_FILTER_BY_SESSION(pSession->StartupInfo.uSessionID); 1107 rc = VbglR3GuestCtrlMsgFilterSet(uClientID, 1108 VBOX_GUESTCTRL_CONTEXTID_MAKE_SESSION(pSession->StartupInfo.uSessionID), 1109 uFilterAdd, 0 /* Filter remove */); 1106 1110 VBoxServiceVerbose(3, "Setting message filterAdd=0x%x returned %Rrc\n", 1107 1111 uFilterAdd, rc); … … 1930 1934 int rc = GstCntlSessionThreadWait(pThread, 1931 1935 5 * 60 * 1000 /* 5 minutes timeout */, uFlags); 1932 /** @todo Kill session process if still around? */1933 1936 1934 1937 /* Remove session from list and destroy object. */ 1935 1938 RTListNodeRemove(&pThread->Node); 1939 1936 1940 RTMemFree(pThread); 1941 pThread = NULL; 1937 1942 1938 1943 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.