VirtualBox

Changeset 31752 in vbox


Ignore:
Timestamp:
Aug 18, 2010 11:25:40 AM (14 years ago)
Author:
vboxsync
Message:

VBoxGuest.cpp: A shadowed variable (Info), identing.

File:
1 edited

Legend:

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

    r31720 r31752  
    11811181                                          VBoxGuestWaitEventInfo *pInfo,  size_t *pcbDataReturned, bool fInterruptible)
    11821182{
    1183     const uint32_t fReqEvents = pInfo->u32EventMaskIn;
    1184     uint32_t fResEvents;
    1185     int iEvent;
    1186     int rc;
    1187     RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;
    1188     PVBOXGUESTWAIT pWait;
     1183    RTSPINLOCKTMP   Tmp = RTSPINLOCKTMP_INITIALIZER;
     1184    const uint32_t  fReqEvents = pInfo->u32EventMaskIn;
     1185    uint32_t        fResEvents;
     1186    int             iEvent;
     1187    PVBOXGUESTWAIT  pWait;
     1188    int             rc;
    11891189
    11901190    pInfo->u32EventFlagsOut = 0;
     
    13641364                                           VMMDevRequestHeader *pReqHdr, size_t cbData, size_t *pcbDataReturned)
    13651365{
     1366    int                     rc;
     1367    VMMDevRequestHeader    *pReqCopy;
     1368
    13661369    /*
    13671370     * Validate the header and request size.
     
    13701373    const uint32_t          cbReq     = pReqHdr->size;
    13711374    const uint32_t          cbMinSize = vmmdevGetRequestSize(enmType);
    1372     int rc;
    1373     VMMDevRequestHeader *pReqCopy;
    13741375
    13751376    Log(("VBoxGuestCommonIOCtl: VMMREQUEST type %d\n", pReqHdr->requestType));
     
    16091610            if (i >= RT_ELEMENTS(pSession->aHGCMClientIds))
    16101611            {
    1611                 static unsigned s_cErrors = 0;
     1612                static unsigned             s_cErrors = 0;
    16121613                VBoxGuestHGCMDisconnectInfo Info;
    16131614
     
    16341635     * Validate the client id and invalidate its entry while we're in the call.
    16351636     */
    1636     const uint32_t u32ClientId = pInfo->u32ClientID;
    1637     unsigned i;
    1638     RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;
    1639     int rc;
    1640 
     1637    int             rc;
     1638    const uint32_t  u32ClientId = pInfo->u32ClientID;
     1639    unsigned        i;
     1640    RTSPINLOCKTMP   Tmp = RTSPINLOCKTMP_INITIALIZER;
    16411641    RTSpinlockAcquireNoInts(pDevExt->SessionSpinlock, &Tmp);
    16421642    for (i = 0; i < RT_ELEMENTS(pSession->aHGCMClientIds); i++)
     
    16851685                                         size_t cbExtra, size_t cbData, size_t *pcbDataReturned)
    16861686{
    1687     size_t cbActual;
    1688     const uint32_t u32ClientId = pInfo->u32ClientID;
    1689     unsigned i;
    1690     int rc;
    1691     RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;
    1692     uint32_t fFlags;
     1687    const uint32_t  u32ClientId = pInfo->u32ClientID;
     1688    RTSPINLOCKTMP   Tmp = RTSPINLOCKTMP_INITIALIZER;
     1689    uint32_t        fFlags;
     1690    size_t          cbActual;
     1691    unsigned        i;
     1692    int             rc;
    16931693
    16941694    /*
     
    17841784static int VBoxGuestCommonIOCtl_HGCMClipboardReConnect(PVBOXGUESTDEVEXT pDevExt, uint32_t *pu32ClientId, size_t *pcbDataReturned)
    17851785{
    1786     int rc;
    1787     VBoxGuestHGCMConnectInfo Info;
     1786    int                         rc;
     1787    VBoxGuestHGCMConnectInfo    CnInfo;
    17881788
    17891789    Log(("VBoxGuestCommonIOCtl: CLIPBOARD_CONNECT: Current u32ClientId=%RX32\n", pDevExt->u32ClipboardClientId));
     
    17941794    if (pDevExt->u32ClipboardClientId != 0)
    17951795    {
    1796         VBoxGuestHGCMDisconnectInfo Info;
    1797         Info.result = VERR_WRONG_ORDER;
    1798         Info.u32ClientID = pDevExt->u32ClipboardClientId;
    1799         rc = VbglR0HGCMInternalDisconnect(&Info, VBoxGuestHGCMAsyncWaitCallback, pDevExt, RT_INDEFINITE_WAIT);
     1796        VBoxGuestHGCMDisconnectInfo DiInfo;
     1797        DiInfo.result = VERR_WRONG_ORDER;
     1798        DiInfo.u32ClientID = pDevExt->u32ClipboardClientId;
     1799        rc = VbglR0HGCMInternalDisconnect(&DiInfo, VBoxGuestHGCMAsyncWaitCallback, pDevExt, RT_INDEFINITE_WAIT);
    18001800        if (RT_SUCCESS(rc))
    18011801        {
     
    18031803            return rc;
    18041804        }
    1805         if (RT_FAILURE((int32_t)Info.result))
    1806         {
    1807             Log(("VBoxGuestCommonIOCtl: CLIPBOARD_CONNECT: failed to disconnect old client. Info.result=%Rrc\n", rc));
    1808             return Info.result;
     1805        if (RT_FAILURE((int32_t)DiInfo.result))
     1806        {
     1807            Log(("VBoxGuestCommonIOCtl: CLIPBOARD_CONNECT: failed to disconnect old client. DiInfo.result=%Rrc\n", DiInfo.result));
     1808            return DiInfo.result;
    18091809        }
    18101810        pDevExt->u32ClipboardClientId = 0;
     
    18141814     * Try connect.
    18151815     */
    1816     Info.Loc.type = VMMDevHGCMLoc_LocalHost_Existing;
    1817     strcpy(Info.Loc.u.host.achName, "VBoxSharedClipboard");
    1818     Info.u32ClientID = 0;
    1819     Info.result = VERR_WRONG_ORDER;
    1820 
    1821     rc = VbglR0HGCMInternalConnect(&Info, VBoxGuestHGCMAsyncWaitCallback, pDevExt, RT_INDEFINITE_WAIT);
     1816    CnInfo.Loc.type = VMMDevHGCMLoc_LocalHost_Existing;
     1817    strcpy(CnInfo.Loc.u.host.achName, "VBoxSharedClipboard");
     1818    CnInfo.u32ClientID = 0;
     1819    CnInfo.result = VERR_WRONG_ORDER;
     1820
     1821    rc = VbglR0HGCMInternalConnect(&CnInfo, VBoxGuestHGCMAsyncWaitCallback, pDevExt, RT_INDEFINITE_WAIT);
    18221822    if (RT_FAILURE(rc))
    18231823    {
     
    18251825        return rc;
    18261826    }
    1827     if (RT_FAILURE(Info.result))
     1827    if (RT_FAILURE(CnInfo.result))
    18281828    {
    18291829        LogRel(("VBoxGuestCommonIOCtl: CLIPBOARD_CONNECT: VbglHGCMConnected -> rc=%Rrc\n", rc));
     
    18311831    }
    18321832
    1833     Log(("VBoxGuestCommonIOCtl: CLIPBOARD_CONNECT: connected successfully u32ClientId=%RX32\n", Info.u32ClientID));
    1834 
    1835     pDevExt->u32ClipboardClientId = Info.u32ClientID;
    1836     *pu32ClientId = Info.u32ClientID;
     1833    Log(("VBoxGuestCommonIOCtl: CLIPBOARD_CONNECT: connected successfully u32ClientId=%RX32\n", CnInfo.u32ClientID));
     1834
     1835    pDevExt->u32ClipboardClientId = CnInfo.u32ClientID;
     1836    *pu32ClientId = CnInfo.u32ClientID;
    18371837    if (pcbDataReturned)
    18381838        *pcbDataReturned = sizeof(uint32_t);
     
    20032003{
    20042004    int rc;
    2005 
    20062005    Log(("VBoxGuestCommonIOCtl: iFunction=%#x pDevExt=%p pSession=%p pvData=%p cbData=%zu\n",
    20072006         iFunction, pDevExt, pSession, pvData, cbData));
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