VirtualBox

Changeset 1577 in vbox


Ignore:
Timestamp:
Mar 20, 2007 5:34:20 PM (18 years ago)
Author:
vboxsync
Message:

Do not access already completed message in HGCM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/hgcm/HGCM.cpp

    r1399 r1577  
    471471        }
    472472
    473         switch (pMsgCore->MsgId ())
     473        /* Cache required information to avoid unnecessary pMsgCore access. */
     474        uint32_t u32MsgId = pMsgCore->MsgId ();
     475
     476        switch (u32MsgId)
    474477        {
    475478            case HGCMMSGID_SVC_LOAD:
     
    589592            default:
    590593            {
    591                 Log(("hgcmServiceThread::Unsupported message number %08X\n", pMsgCore->MsgId ()));
     594                Log(("hgcmServiceThread::Unsupported message number %08X\n", u32MsgId));
    592595                rc = VERR_NOT_SUPPORTED;
    593596            } break;
    594597        }
    595598
    596         if (   pMsgCore->MsgId () != HGCMMSGID_GUESTCALL
    597             && pMsgCore->MsgId () != HGCMMSGID_HOSTCALL)
     599        if (   u32MsgId != HGCMMSGID_GUESTCALL
     600            && u32MsgId != HGCMMSGID_HOSTCALL)
    598601        {
    599602            /* For HGCMMSGID_GUESTCALL & HGCMMSGID_HOSTCALL the service
     
    12151218        }
    12161219
    1217         switch (pMsgCore->MsgId ())
     1220        uint32_t u32MsgId = pMsgCore->MsgId ();
     1221
     1222        switch (u32MsgId)
    12181223        {
    12191224            case HGCMMSGID_CONNECT:
     
    13461351            default:
    13471352            {
    1348                 Log(("hgcmThread: Unsupported message number %08X!!!\n", pMsgCore->MsgId ()));
     1353                Log(("hgcmThread: Unsupported message number %08X!!!\n", u32MsgId));
    13491354                rc = VERR_NOT_SUPPORTED;
    13501355            } break;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy