Changeset 71432 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Mar 21, 2018 1:33:17 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 121400
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp
r71405 r71432 1093 1093 VGSvcVerbose(3, "Unsupported message (uMsg=%RU32, cParms=%RU32) from host, skipping\n", uMsg, pHostCtx->uNumParms); 1094 1094 1095 /** 1096 * !!! HACK ALERT BEGIN !!! 1097 * As peeking for the current message by VbglR3GuestCtrlMsgWaitFor() / GUEST_MSG_WAIT only gives us the message type and 1098 * the number of parameters, but *not* the actual context ID the message is bound to, try to retrieve it here. 1099 * 1100 * This is needed in order to reply to the host with the current context ID, without breaking existing clients. 1101 * Not doing this isn't fatal, but will make host clients wait longer (timing out) for not implemented messages. 1102 ** @todo Get rid of this as soon as we have a protocl bump (v4). 1103 */ 1104 struct HGCMMsgSkip 1105 { 1106 VBGLIOCHGCMCALL hdr; 1107 /** UInt32: Context ID. */ 1108 HGCMFunctionParameter context; 1109 }; 1110 1111 HGCMMsgSkip Msg; 1112 VBGL_HGCM_HDR_INIT(&Msg.hdr, pHostCtx->uClientID, GUEST_MSG_WAIT, pHostCtx->uNumParms); 1113 1114 /* Don't want to drag in VbglHGCMParmUInt32Set(). */ 1115 Msg.context.type = VMMDevHGCMParmType_32bit; 1116 Msg.context.u.value64 = 0; /* init unused bits to 0 */ 1117 Msg.context.u.value32 = 0; 1118 1119 /* Retrieve the context ID of the message which is not supported and put it in pHostCtx. */ 1120 int rc2 = VbglR3HGCMCall(&Msg.hdr, sizeof(Msg)); 1121 if (RT_SUCCESS(rc2)) 1122 Msg.context.GetUInt32(&pHostCtx->uContextID); 1123 1124 /** !!! !!! 1125 * !!! HACK ALERT END !!! 1126 * !!! !!! */ 1127 1128 rc2 = VbglR3GuestCtrlMsgReply(pHostCtx, VERR_NOT_SUPPORTED); 1129 AssertRC(rc2); 1130 1095 1131 /* Tell the host service to skip the message. */ 1096 1132 VbglR3GuestCtrlMsgSkip(pHostCtx->uClientID);
Note:
See TracChangeset
for help on using the changeset viewer.