VirtualBox

Changeset 75895 in vbox


Ignore:
Timestamp:
Dec 3, 2018 12:12:57 PM (6 years ago)
Author:
vboxsync
Message:

VBoxService/guestcontrol: Removed annoying message skip hack since it's not in 5.2.x. bugref:9313

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp

    r75890 r75895  
    12251225    {
    12261226        /* 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);
    12281228        if (VbglR3GuestCtrlSupportsOptimizations(pHostCtx->uClientID))
    12291229            VbglR3GuestCtrlMsgSkip(pHostCtx->uClientID, VERR_NOT_SUPPORTED, uMsg);
    12301230        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 and
    1235              * 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 HGCMMsgSkip
    1241             {
    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. */
    12651231            VbglR3GuestCtrlMsgSkipOld(pHostCtx->uClientID);
    1266 
    1267             rc = VINF_SUCCESS;
    1268         }
     1232        rc = VINF_SUCCESS;
    12691233    }
    12701234
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