Changeset 75895 in vbox
- Timestamp:
- Dec 3, 2018 12:12:57 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp
r75890 r75895 1225 1225 { 1226 1226 /* We must skip and notify host here as best we can... */ 1227 VGSvcVerbose( 3, "Unsupported message (uMsg=%RU32, cParms=%RU32) from host, skipping\n", uMsg, pHostCtx->uNumParms);1227 VGSvcVerbose(1, "Unsupported message (uMsg=%RU32, cParms=%RU32) from host, skipping\n", uMsg, pHostCtx->uNumParms); 1228 1228 if (VbglR3GuestCtrlSupportsOptimizations(pHostCtx->uClientID)) 1229 1229 VbglR3GuestCtrlMsgSkip(pHostCtx->uClientID, VERR_NOT_SUPPORTED, uMsg); 1230 1230 else 1231 {1232 /*1233 * !!! HACK ALERT BEGIN !!!1234 * As peeking for the current message by VbglR3GuestCtrlMsgWaitFor() / GUEST_MSG_WAIT only gives us the message type and1235 * the number of parameters, but *not* the actual context ID the message is bound to, try to retrieve it here.1236 *1237 * This is needed in order to reply to the host with the current context ID, without breaking existing clients.1238 * Not doing this isn't fatal, but will make host clients wait longer (timing out) for not implemented messages. */1239 /** @todo Get rid of this as soon as we have a protocol bump (v4). */1240 struct HGCMMsgSkip1241 {1242 VBGLIOCHGCMCALL hdr;1243 /** UInt32: Context ID. */1244 HGCMFunctionParameter context;1245 };1246 1247 HGCMMsgSkip Msg;1248 VBGL_HGCM_HDR_INIT(&Msg.hdr, pHostCtx->uClientID, GUEST_MSG_WAIT, pHostCtx->uNumParms);1249 Msg.context.SetUInt32(0);1250 1251 /* Retrieve the context ID of the message which is not supported and put it in pHostCtx. */1252 int rc2 = VbglR3HGCMCall(&Msg.hdr, sizeof(Msg));1253 if (RT_SUCCESS(rc2))1254 Msg.context.GetUInt32(&pHostCtx->uContextID);1255 1256 /* Now fake a reply to the message. */1257 rc2 = VbglR3GuestCtrlMsgReply(pHostCtx, VERR_NOT_SUPPORTED);1258 AssertRC(rc2);1259 1260 /* !!! !!!1261 * !!! HACK ALERT END !!!1262 * !!! !!! */1263 1264 /* Tell the host service to skip the message. */1265 1231 VbglR3GuestCtrlMsgSkipOld(pHostCtx->uClientID); 1266 1267 rc = VINF_SUCCESS; 1268 } 1232 rc = VINF_SUCCESS; 1269 1233 } 1270 1234
Note:
See TracChangeset
for help on using the changeset viewer.