VirtualBox

Changeset 94960 in vbox for trunk


Ignore:
Timestamp:
May 9, 2022 2:22:27 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
151368
Message:

Main/src-client/ConsoleVRDPServer.cpp: Adjust to the new rules wrt. to rc -> hrc,vrc usage, ​bugref:10223

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp

    r93115 r94960  
    564564    ConsoleVRDPServer *server = static_cast<ConsoleVRDPServer*>(pvCallback);
    565565
    566     int rc = VERR_NOT_SUPPORTED;
     566    int vrc = VERR_NOT_SUPPORTED;
    567567
    568568    switch (index)
     
    576576            {
    577577                *(uint32_t *)pvBuffer = (uint32_t)port;
    578                 rc = VINF_SUCCESS;
     578                vrc = VINF_SUCCESS;
    579579            }
    580580            else
    581581            {
    582                 rc = VINF_BUFFER_OVERFLOW;
     582                vrc = VINF_BUFFER_OVERFLOW;
    583583            }
    584584
     
    599599            {
    600600                /* More than 64K seems to be an  invalid address. */
    601                 rc = VERR_TOO_MUCH_DATA;
     601                vrc = VERR_TOO_MUCH_DATA;
    602602                break;
    603603            }
     
    606606            {
    607607                memcpy(pvBuffer, address.c_str(), cbAddress);
    608                 rc = VINF_SUCCESS;
     608                vrc = VINF_SUCCESS;
    609609            }
    610610            else
    611611            {
    612                 rc = VINF_BUFFER_OVERFLOW;
     612                vrc = VINF_BUFFER_OVERFLOW;
    613613            }
    614614
     
    623623            {
    624624                *(uint32_t *)pvBuffer = (uint32_t)cMonitors;
    625                 rc = VINF_SUCCESS;
     625                vrc = VINF_SUCCESS;
    626626            }
    627627            else
    628628            {
    629                 rc = VINF_BUFFER_OVERFLOW;
     629                vrc = VINF_BUFFER_OVERFLOW;
    630630            }
    631631
     
    656656            {
    657657                /* More than 64K seems to be an invalid port range string. */
    658                 rc = VERR_TOO_MUCH_DATA;
     658                vrc = VERR_TOO_MUCH_DATA;
    659659                break;
    660660            }
     
    663663            {
    664664                memcpy(pvBuffer, portRange.c_str(), cbPortRange);
    665                 rc = VINF_SUCCESS;
     665                vrc = VINF_SUCCESS;
    666666            }
    667667            else
    668668            {
    669                 rc = VINF_BUFFER_OVERFLOW;
     669                vrc = VINF_BUFFER_OVERFLOW;
    670670            }
    671671
     
    692692            {
    693693                *(uint32_t *)pvBuffer = (uint32_t)fVideoEnabled;
    694                 rc = VINF_SUCCESS;
     694                vrc = VINF_SUCCESS;
    695695            }
    696696            else
    697697            {
    698                 rc = VINF_BUFFER_OVERFLOW;
     698                vrc = VINF_BUFFER_OVERFLOW;
    699699            }
    700700
     
    720720            {
    721721                *(uint32_t *)pvBuffer = (uint32_t)ulQuality;
    722                 rc = VINF_SUCCESS;
     722                vrc = VINF_SUCCESS;
    723723            }
    724724            else
    725725            {
    726                 rc = VINF_BUFFER_OVERFLOW;
     726                vrc = VINF_BUFFER_OVERFLOW;
    727727            }
    728728
     
    749749            {
    750750                *(uint32_t *)pvBuffer = (uint32_t)ulSunFlsh;
    751                 rc = VINF_SUCCESS;
     751                vrc = VINF_SUCCESS;
    752752            }
    753753            else
    754754            {
    755                 rc = VINF_BUFFER_OVERFLOW;
     755                vrc = VINF_BUFFER_OVERFLOW;
    756756            }
    757757
     
    763763            if (cbBuffer < sizeof(VRDEFEATURE))
    764764            {
    765                 rc = VERR_INVALID_PARAMETER;
     765                vrc = VERR_INVALID_PARAMETER;
    766766                break;
    767767            }
     
    772772
    773773            size_t cchInfo = 0;
    774             rc = RTStrNLenEx(pFeature->achInfo, cbInfo, &cchInfo);
    775 
    776             if (RT_FAILURE(rc))
    777             {
    778                 rc = VERR_INVALID_PARAMETER;
     774            vrc = RTStrNLenEx(pFeature->achInfo, cbInfo, &cchInfo);
     775
     776            if (RT_FAILURE(vrc))
     777            {
     778                vrc = VERR_INVALID_PARAMETER;
    779779                break;
    780780            }
     
    810810                    if (FAILED(hrc))
    811811                    {
    812                         rc = VERR_NOT_SUPPORTED;
     812                        vrc = VERR_NOT_SUPPORTED;
    813813                    }
    814814                }
     
    822822                if (FAILED(hrc))
    823823                {
    824                     rc = VERR_NOT_SUPPORTED;
     824                    vrc = VERR_NOT_SUPPORTED;
    825825                }
    826826            }
    827827            else
    828828            {
    829                 rc = VERR_NOT_SUPPORTED;
     829                vrc = VERR_NOT_SUPPORTED;
    830830            }
    831831
    832832            /* Copy the value string to the callers buffer. */
    833             if (rc == VINF_SUCCESS)
     833            if (vrc == VINF_SUCCESS)
    834834            {
    835835                com::Utf8Str value = bstrValue;
     
    843843                else
    844844                {
    845                     rc = VINF_BUFFER_OVERFLOW;
     845                    vrc = VINF_BUFFER_OVERFLOW;
    846846                }
    847847
     
    854854            if (cbBuffer != sizeof(uint32_t))
    855855            {
    856                 rc = VERR_INVALID_PARAMETER;
     856                vrc = VERR_INVALID_PARAMETER;
    857857                break;
    858858            }
     
    862862            server->mVRDPBindPort = port;
    863863
    864             rc = VINF_SUCCESS;
     864            vrc = VINF_SUCCESS;
    865865
    866866            if (pcbOut)
     
    876876            if (cbBuffer < sizeof(VRDECLIENTSTATUS))
    877877            {
    878                 rc = VERR_INVALID_PARAMETER;
     878                vrc = VERR_INVALID_PARAMETER;
    879879                break;
    880880            }
     
    886886            if (cbBuffer < RT_UOFFSETOF(VRDECLIENTSTATUS, achStatus) + pStatus->cbStatus)
    887887            {
    888                 rc = VERR_INVALID_PARAMETER;
     888                vrc = VERR_INVALID_PARAMETER;
    889889                break;
    890890            }
    891891
    892892            size_t cchStatus = 0;
    893             rc = RTStrNLenEx(pStatus->achStatus, cbStatus, &cchStatus);
    894 
    895             if (RT_FAILURE(rc))
    896             {
    897                 rc = VERR_INVALID_PARAMETER;
     893            vrc = RTStrNLenEx(pStatus->achStatus, cbStatus, &cchStatus);
     894
     895            if (RT_FAILURE(vrc))
     896            {
     897                vrc = VERR_INVALID_PARAMETER;
    898898                break;
    899899            }
     
    903903            server->mConsole->i_VRDPClientStatusChange(pStatus->u32ClientId, pStatus->achStatus);
    904904
    905             rc = VINF_SUCCESS;
     905            vrc = VINF_SUCCESS;
    906906
    907907            if (pcbOut)
     
    917917    }
    918918
    919     return rc;
     919    return vrc;
    920920}
    921921
     
    990990    LogFlowFunc(("%x\n", fu32Intercept));
    991991
    992     int rc = VERR_NOT_SUPPORTED;
     992    int vrc = VERR_NOT_SUPPORTED;
    993993
    994994    switch (fu32Intercept)
     
    10011001                *ppvIntercept = pServer;
    10021002            }
    1003             rc = VINF_SUCCESS;
     1003            vrc = VINF_SUCCESS;
    10041004        } break;
    10051005
     
    10071007        {
    10081008            pServer->mConsole->i_VRDPInterceptUSB(u32ClientId, ppvIntercept);
    1009             rc = VINF_SUCCESS;
     1009            vrc = VINF_SUCCESS;
    10101010        } break;
    10111011
     
    10171017                *ppvIntercept = pServer;
    10181018            }
    1019             rc = VINF_SUCCESS;
     1019            vrc = VINF_SUCCESS;
    10201020        } break;
    10211021
     
    10391039            {
    10401040                Log(("AUDIOIN: ignored client %RU32, active client %RU32\n", u32ClientId, pServer->mu32AudioInputClientId));
    1041                 rc = VERR_NOT_SUPPORTED;
     1041                vrc = VERR_NOT_SUPPORTED;
    10421042            }
    10431043        } break;
     
    10471047    }
    10481048
    1049     return rc;
     1049    return vrc;
    10501050}
    10511051
     
    13401340    mConsole = console;
    13411341
    1342     int rc = RTCritSectInit(&mCritSect);
    1343     AssertRC(rc);
     1342    int vrc = RTCritSectInit(&mCritSect);
     1343    AssertRC(vrc);
    13441344
    13451345    mcClipboardRefs = 0;
     
    14131413    RT_ZERO(m_interfaceCallbacksInput);
    14141414
    1415     rc = RTCritSectInit(&mTSMFLock);
    1416     AssertRC(rc);
     1415    vrc = RTCritSectInit(&mTSMFLock);
     1416    AssertRC(vrc);
    14171417
    14181418    mEmWebcam = new EmWebcam(this);
     
    18921892        else
    18931893        {
    1894             int rc = p->fFallback?
    1895                         VERR_NOT_SUPPORTED: /* Try to go out of fallback mode. */
    1896                         p->pThis->m_interfaceImage.VRDEImageGeometrySet(p->hImageBitmap, &rect);
     1894            int vrc = p->fFallback?
     1895                         VERR_NOT_SUPPORTED: /* Try to go out of fallback mode. */
     1896                         p->pThis->m_interfaceImage.VRDEImageGeometrySet(p->hImageBitmap, &rect);
    18971897            if (RT_SUCCESS(rc))
    18981898            {
     
    19241924        uint32_t fu32CompletionFlags = 0;
    19251925        p->fFallback = false;
    1926         int rc = p->pThis->m_interfaceImage.VRDEImageHandleCreate(p->pThis->mhServer,
    1927                                                                   &p->hImageBitmap,
    1928                                                                   p,
    1929                                                                   u32ScreenId,
    1930                                                                   VRDE_IMAGE_F_CREATE_CONTENT_3D
    1931                                                                   | VRDE_IMAGE_F_CREATE_WINDOW,
    1932                                                                   &rect,
    1933                                                                   VRDE_IMAGE_FMT_ID_BITMAP_BGRA8,
    1934                                                                   NULL,
    1935                                                                   0,
    1936                                                                   &fu32CompletionFlags);
     1926        int vrc = p->pThis->m_interfaceImage.VRDEImageHandleCreate(p->pThis->mhServer,
     1927                                                                   &p->hImageBitmap,
     1928                                                                   p,
     1929                                                                   u32ScreenId,
     1930                                                                   VRDE_IMAGE_F_CREATE_CONTENT_3D
     1931                                                                   | VRDE_IMAGE_F_CREATE_WINDOW,
     1932                                                                   &rect,
     1933                                                                   VRDE_IMAGE_FMT_ID_BITMAP_BGRA8,
     1934                                                                   NULL,
     1935                                                                   0,
     1936                                                                   &fu32CompletionFlags);
    19371937        if (RT_FAILURE(rc))
    19381938        {
     
    19411941            fu32CompletionFlags = 0;
    19421942            p->fFallback = true;
    1943             rc = p->pThis->m_interfaceImage.VRDEImageHandleCreate(p->pThis->mhServer,
    1944                                                                   &p->hImageBitmap,
    1945                                                                   p,
    1946                                                                   u32ScreenId,
    1947                                                                   0,
    1948                                                                   &rect,
    1949                                                                   VRDE_IMAGE_FMT_ID_BITMAP_BGRA8,
    1950                                                                   NULL,
    1951                                                                   0,
    1952                                                                   &fu32CompletionFlags);
     1943            vrc = p->pThis->m_interfaceImage.VRDEImageHandleCreate(p->pThis->mhServer,
     1944                                                                   &p->hImageBitmap,
     1945                                                                   p,
     1946                                                                   u32ScreenId,
     1947                                                                   0,
     1948                                                                   &rect,
     1949                                                                   VRDE_IMAGE_FMT_ID_BITMAP_BGRA8,
     1950                                                                   NULL,
     1951                                                                   0,
     1952                                                                   &fu32CompletionFlags);
    19531953        }
    19541954
    19551955        H3DORLOG(("H3DORGeometry: Image handle create %Rrc, flags 0x%RX32\n", rc, fu32CompletionFlags));
    19561956
    1957         if (RT_SUCCESS(rc))
     1957        if (RT_SUCCESS(vrc))
    19581958        {
    19591959            p->x = x;
     
    20632063{
    20642064    RT_NOREF(pvContext, pvBuffer);
    2065     int rc = VINF_SUCCESS;
     2065    int vrc = VINF_SUCCESS;
    20662066
    20672067    H3DORLOG(("H3DORContextProperty: index %d\n", index));
     
    20842084        else
    20852085        {
    2086             rc = VERR_BUFFER_OVERFLOW;
     2086            vrc = VERR_BUFFER_OVERFLOW;
    20872087        }
    20882088        *pcbOut = cbOut;
     
    20902090    else
    20912091    {
    2092         rc = VERR_NOT_SUPPORTED;
    2093     }
    2094 
    2095     H3DORLOG(("H3DORContextProperty: %Rrc\n", rc));
    2096     return rc;
     2092        vrc = VERR_NOT_SUPPORTED;
     2093    }
     2094
     2095    H3DORLOG(("H3DORContextProperty: %Rrc\n", vrc));
     2096    return vrc;
    20972097}
    20982098#endif
     
    22122212
    22132213/* static */ DECLCALLBACK(int) ConsoleVRDPServer::VRDESCardCbResponse(void *pvContext,
    2214                                                                       int rcRequest,
     2214                                                                      int vrcRequest,
    22152215                                                                      void *pvUser,
    22162216                                                                      uint32_t u32Function,
     
    22212221    ConsoleVRDPServer *pThis = static_cast<ConsoleVRDPServer*>(pvContext);
    22222222    UsbCardReader *pReader = pThis->mConsole->i_getUsbCardReader();
    2223     return pReader->VRDEResponse(rcRequest, pvUser, u32Function, pvData, cbData);
     2223    return pReader->VRDEResponse(vrcRequest, pvUser, u32Function, pvData, cbData);
    22242224#else
    22252225    NOREF(pvContext);
    2226     NOREF(rcRequest);
     2226    NOREF(vrcRequest);
    22272227    NOREF(pvUser);
    22282228    NOREF(u32Function);
     
    22352235int ConsoleVRDPServer::SCardRequest(void *pvUser, uint32_t u32Function, const void *pvData, uint32_t cbData)
    22362236{
    2237     int rc = VINF_SUCCESS;
     2237    int vrc = VINF_SUCCESS;
    22382238
    22392239    if (mhServer && mpEntryPoints && m_interfaceSCard.VRDESCardRequest)
    22402240    {
    2241         rc = m_interfaceSCard.VRDESCardRequest(mhServer, pvUser, u32Function, pvData, cbData);
     2241        vrc = m_interfaceSCard.VRDESCardRequest(mhServer, pvUser, u32Function, pvData, cbData);
    22422242    }
    22432243    else
    22442244    {
    2245         rc = VERR_NOT_SUPPORTED;
    2246     }
    2247 
    2248     return rc;
     2245        vrc = VERR_NOT_SUPPORTED;
     2246    }
     2247
     2248    return vrc;
    22492249}
    22502250
     
    22982298int ConsoleVRDPServer::tsmfLock(void)
    22992299{
    2300     int rc = RTCritSectEnter(&mTSMFLock);
    2301     AssertRC(rc);
    2302     return rc;
     2300    int vrc = RTCritSectEnter(&mTSMFLock);
     2301    AssertRC(vrc);
     2302    return vrc;
    23032303}
    23042304
     
    23222322    TSMFVRDPCTX *pVRDPCtx = NULL;
    23232323
    2324     int rc = tsmfContextsAlloc(&pHostChCtx, &pVRDPCtx);
    2325     if (RT_FAILURE(rc))
    2326     {
    2327         return rc;
     2324    int vrc = tsmfContextsAlloc(&pHostChCtx, &pVRDPCtx);
     2325    if (RT_FAILURE(vrc))
     2326    {
     2327        return vrc;
    23282328    }
    23292329
     
    23362336    pVRDPCtx->pHostChCtx = pHostChCtx;
    23372337
    2338     rc = pThis->m_interfaceTSMF.VRDETSMFChannelCreate(pThis->mhServer, pVRDPCtx, u32Flags);
    2339 
    2340     if (RT_SUCCESS(rc))
     2338    vrc = pThis->m_interfaceTSMF.VRDETSMFChannelCreate(pThis->mhServer, pVRDPCtx, u32Flags);
     2339
     2340    if (RT_SUCCESS(vrc))
    23412341    {
    23422342        /** @todo contexts should be in a list for accounting. */
     
    23492349    }
    23502350
    2351     return rc;
     2351    return vrc;
    23522352}
    23532353
     
    23592359    ConsoleVRDPServer *pThis = pHostChCtx->pThis;
    23602360
    2361     int rc = pThis->tsmfLock();
    2362     if (RT_SUCCESS(rc))
     2361    int vrc = pThis->tsmfLock();
     2362    if (RT_SUCCESS(vrc))
    23632363    {
    23642364        bool fClose = false;
     
    23982398    ConsoleVRDPServer *pThis = pHostChCtx->pThis;
    23992399
    2400     int rc = pThis->tsmfLock();
    2401     if (RT_SUCCESS(rc))
     2400    int vrc = pThis->tsmfLock();
     2401    if (RT_SUCCESS(vrc))
    24022402    {
    24032403        bool fSend = false;
     
    24152415        {
    24162416            LogFlowFunc(("Send to VRDE channel %d.\n", u32ChannelHandle));
    2417             rc = pThis->m_interfaceTSMF.VRDETSMFChannelSend(pThis->mhServer, u32ChannelHandle,
    2418                                                             pvData, cbData);
    2419         }
    2420     }
    2421 
    2422     return rc;
     2417            vrc = pThis->m_interfaceTSMF.VRDETSMFChannelSend(pThis->mhServer, u32ChannelHandle,
     2418                                                             pvData, cbData);
     2419        }
     2420    }
     2421
     2422    return vrc;
    24232423}
    24242424
     
    24342434    ConsoleVRDPServer *pThis = pHostChCtx->pThis;
    24352435
    2436     int rc = pThis->tsmfLock();
    2437     if (RT_SUCCESS(rc))
     2436    int vrc = pThis->tsmfLock();
     2437    if (RT_SUCCESS(vrc))
    24382438    {
    24392439        uint32_t cbToCopy = RT_MIN(cbData, pHostChCtx->cbDataReceived);
     
    24602460    }
    24612461
    2462     return rc;
     2462    return vrc;
    24632463}
    24642464
     
    25292529    }
    25302530
    2531     int rc = pVMMDev->hgcmHostCall("VBoxHostChannel",
    2532                                    VBOX_HOST_CHANNEL_HOST_FN_REGISTER,
    2533                                    2,
    2534                                    &parms.name);
    2535 
    2536     if (!RT_SUCCESS(rc))
    2537     {
    2538         Log(("VBOX_HOST_CHANNEL_HOST_FN_REGISTER failed with %Rrc\n", rc));
     2531    int vrc = pVMMDev->hgcmHostCall("VBoxHostChannel",
     2532                                    VBOX_HOST_CHANNEL_HOST_FN_REGISTER,
     2533                                    2,
     2534                                    &parms.name);
     2535
     2536    if (!RT_SUCCESS(vrc))
     2537    {
     2538        Log(("VBOX_HOST_CHANNEL_HOST_FN_REGISTER failed with %Rrc\n", vrc));
    25392539        return;
    25402540    }
     
    25572557{
    25582558    RT_NOREF(cbParm);
    2559     int rc = VINF_SUCCESS;
     2559    int vrc = VINF_SUCCESS;
    25602560
    25612561    ConsoleVRDPServer *pThis = static_cast<ConsoleVRDPServer*>(pvContext);
     
    26082608            ev.u32SizeAvailable = 0;
    26092609
    2610             rc = pThis->tsmfLock();
    2611 
    2612             if (RT_SUCCESS(rc))
     2610            vrc = pThis->tsmfLock();
     2611
     2612            if (RT_SUCCESS(vrc))
    26132613            {
    26142614                TSMFHOSTCHCTX *pHostChCtx = pVRDPCtx->pHostChCtx;
     
    26622662            pVRDPCtx->pvCallbacks = NULL;
    26632663
    2664             rc = pThis->tsmfLock();
    2665             if (RT_SUCCESS(rc))
     2664            vrc = pThis->tsmfLock();
     2665            if (RT_SUCCESS(vrc))
    26662666            {
    26672667                if (pVRDPCtx->pHostChCtx)
     
    26982698
    26992699/* static */ DECLCALLBACK(void) ConsoleVRDPServer::VRDECallbackVideoInDeviceDesc(void *pvCallback,
    2700                                                                                  int rcRequest,
     2700                                                                                 int vrcRequest,
    27012701                                                                                 void *pDeviceCtx,
    27022702                                                                                 void *pvUser,
     
    27072707    if (pThis->mEmWebcam)
    27082708    {
    2709         pThis->mEmWebcam->EmWebcamCbDeviceDesc(rcRequest, pDeviceCtx, pvUser, pDeviceDesc, cbDevice);
     2709        pThis->mEmWebcam->EmWebcamCbDeviceDesc(vrcRequest, pDeviceCtx, pvUser, pDeviceDesc, cbDevice);
    27102710    }
    27112711}
    27122712
    27132713/* static */ DECLCALLBACK(void) ConsoleVRDPServer::VRDECallbackVideoInControl(void *pvCallback,
    2714                                                                               int rcRequest,
     2714                                                                              int vrcRequest,
    27152715                                                                              void *pDeviceCtx,
    27162716                                                                              void *pvUser,
     
    27212721    if (pThis->mEmWebcam)
    27222722    {
    2723         pThis->mEmWebcam->EmWebcamCbControl(rcRequest, pDeviceCtx, pvUser, pControl, cbControl);
     2723        pThis->mEmWebcam->EmWebcamCbControl(vrcRequest, pDeviceCtx, pvUser, pControl, cbControl);
    27242724    }
    27252725}
    27262726
    27272727/* static */ DECLCALLBACK(void) ConsoleVRDPServer::VRDECallbackVideoInFrame(void *pvCallback,
    2728                                                                             int rcRequest,
     2728                                                                            int vrcRequest,
    27292729                                                                            void *pDeviceCtx,
    27302730                                                                            const VRDEVIDEOINPAYLOADHDR *pFrame,
     
    27342734    if (pThis->mEmWebcam)
    27352735    {
    2736         pThis->mEmWebcam->EmWebcamCbFrame(rcRequest, pDeviceCtx, pFrame, cbFrame);
     2736        pThis->mEmWebcam->EmWebcamCbFrame(vrcRequest, pDeviceCtx, pFrame, cbFrame);
    27372737    }
    27382738}
     
    27402740int ConsoleVRDPServer::VideoInDeviceAttach(const VRDEVIDEOINDEVICEHANDLE *pDeviceHandle, void *pvDeviceCtx)
    27412741{
    2742     int rc;
     2742    int vrc;
    27432743
    27442744    if (mhServer && mpEntryPoints && m_interfaceVideoIn.VRDEVideoInDeviceAttach)
    27452745    {
    2746         rc = m_interfaceVideoIn.VRDEVideoInDeviceAttach(mhServer, pDeviceHandle, pvDeviceCtx);
     2746        vrc = m_interfaceVideoIn.VRDEVideoInDeviceAttach(mhServer, pDeviceHandle, pvDeviceCtx);
    27472747    }
    27482748    else
    27492749    {
    2750         rc = VERR_NOT_SUPPORTED;
    2751     }
    2752 
    2753     return rc;
     2750        vrc = VERR_NOT_SUPPORTED;
     2751    }
     2752
     2753    return vrc;
    27542754}
    27552755
    27562756int ConsoleVRDPServer::VideoInDeviceDetach(const VRDEVIDEOINDEVICEHANDLE *pDeviceHandle)
    27572757{
    2758     int rc;
     2758    int vrc;
    27592759
    27602760    if (mhServer && mpEntryPoints && m_interfaceVideoIn.VRDEVideoInDeviceDetach)
    27612761    {
    2762         rc = m_interfaceVideoIn.VRDEVideoInDeviceDetach(mhServer, pDeviceHandle);
     2762        vrc = m_interfaceVideoIn.VRDEVideoInDeviceDetach(mhServer, pDeviceHandle);
    27632763    }
    27642764    else
    27652765    {
    2766         rc = VERR_NOT_SUPPORTED;
    2767     }
    2768 
    2769     return rc;
     2766        vrc = VERR_NOT_SUPPORTED;
     2767    }
     2768
     2769    return vrc;
    27702770}
    27712771
    27722772int ConsoleVRDPServer::VideoInGetDeviceDesc(void *pvUser, const VRDEVIDEOINDEVICEHANDLE *pDeviceHandle)
    27732773{
    2774     int rc;
     2774    int vrc;
    27752775
    27762776    if (mhServer && mpEntryPoints && m_interfaceVideoIn.VRDEVideoInGetDeviceDesc)
    27772777    {
    2778         rc = m_interfaceVideoIn.VRDEVideoInGetDeviceDesc(mhServer, pvUser, pDeviceHandle);
     2778        vrc = m_interfaceVideoIn.VRDEVideoInGetDeviceDesc(mhServer, pvUser, pDeviceHandle);
    27792779    }
    27802780    else
    27812781    {
    2782         rc = VERR_NOT_SUPPORTED;
    2783     }
    2784 
    2785     return rc;
     2782        vrc = VERR_NOT_SUPPORTED;
     2783    }
     2784
     2785    return vrc;
    27862786}
    27872787
     
    27892789                                      const VRDEVIDEOINCTRLHDR *pReq, uint32_t cbReq)
    27902790{
    2791     int rc;
     2791    int vrc;
    27922792
    27932793    if (mhServer && mpEntryPoints && m_interfaceVideoIn.VRDEVideoInControl)
    27942794    {
    2795         rc = m_interfaceVideoIn.VRDEVideoInControl(mhServer, pvUser, pDeviceHandle, pReq, cbReq);
     2795        vrc = m_interfaceVideoIn.VRDEVideoInControl(mhServer, pvUser, pDeviceHandle, pReq, cbReq);
    27962796    }
    27972797    else
    27982798    {
    2799         rc = VERR_NOT_SUPPORTED;
    2800     }
    2801 
    2802     return rc;
     2799        vrc = VERR_NOT_SUPPORTED;
     2800    }
     2801
     2802    return vrc;
    28032803}
    28042804
    28052805
    28062806/* static */ DECLCALLBACK(void) ConsoleVRDPServer::VRDECallbackInputSetup(void *pvCallback,
    2807                                                                           int rcRequest,
     2807                                                                          int vrcRequest,
    28082808                                                                          uint32_t u32Method,
    28092809                                                                          const void *pvResult,
     
    28112811{
    28122812    NOREF(pvCallback);
    2813     NOREF(rcRequest);
     2813    NOREF(vrcRequest);
    28142814    NOREF(u32Method);
    28152815    NOREF(pvResult);
     
    29212921                                    const uint8_t *pu8Shape)
    29222922{
    2923     int rc = VINF_SUCCESS;
     2923    int vrc = VINF_SUCCESS;
    29242924
    29252925    if (mhServer && mpEntryPoints && m_interfaceMousePtr.VRDEMousePtr)
     
    29602960        else
    29612961        {
    2962             rc = VERR_NO_MEMORY;
     2962            vrc = VERR_NO_MEMORY;
    29632963        }
    29642964    }
    29652965    else
    29662966    {
    2967         rc = VERR_NOT_SUPPORTED;
    2968     }
    2969 
    2970     return rc;
     2967        vrc = VERR_NOT_SUPPORTED;
     2968    }
     2969
     2970    return vrc;
    29712971}
    29722972
     
    30773077    mUSBBackends.thread = thread;
    30783078    mUSBBackends.fThreadRunning = true;
    3079     int rc = RTThreadUserSignal(thread);
    3080     AssertRC(rc);
     3079    int vrc = RTThreadUserSignal(thread);
     3080    AssertRC(vrc);
    30813081}
    30823082
     
    30883088void ConsoleVRDPServer::waitRemoteUSBThreadEvent(RTMSINTERVAL cMillies)
    30893089{
    3090     int rc = RTSemEventWait(mUSBBackends.event, cMillies);
    3091     Assert(RT_SUCCESS(rc) || rc == VERR_TIMEOUT);
    3092     NOREF(rc);
     3090    int vrc = RTSemEventWait(mUSBBackends.event, cMillies);
     3091    Assert(RT_SUCCESS(vrc) || vrc == VERR_TIMEOUT);
     3092    NOREF(vrc);
    30933093}
    30943094
    30953095void ConsoleVRDPServer::remoteUSBThreadStart(void)
    30963096{
    3097     int rc = RTSemEventCreate(&mUSBBackends.event);
    3098 
    3099     if (RT_FAILURE(rc))
     3097    int vrc = RTSemEventCreate(&mUSBBackends.event);
     3098
     3099    if (RT_FAILURE(vrc))
    31003100    {
    31013101        AssertFailed();
     
    31033103    }
    31043104
    3105     if (RT_SUCCESS(rc))
    3106     {
    3107         rc = RTThreadCreate(&mUSBBackends.thread, threadRemoteUSB, this, 65536,
     3105    if (RT_SUCCESS(vrc))
     3106    {
     3107        vrc = RTThreadCreate(&mUSBBackends.thread, threadRemoteUSB, this, 65536,
    31083108                             RTTHREADTYPE_VRDP_IO, RTTHREADFLAGS_WAITABLE, "remote usb");
    31093109    }
    31103110
    3111     if (RT_FAILURE(rc))
    3112     {
    3113         LogRel(("Warning: could not start the remote USB thread, rc = %Rrc!!!\n", rc));
     3111    if (RT_FAILURE(vrc))
     3112    {
     3113        LogRel(("Warning: could not start the remote USB thread, vrc = %Rrc!!!\n", vrc));
    31143114        mUSBBackends.thread = NIL_RTTHREAD;
    31153115    }
     
    31173117    {
    31183118        /* Wait until the thread is ready. */
    3119         rc = RTThreadUserWait(mUSBBackends.thread, 60000);
    3120         AssertRC(rc);
    3121         Assert (mUSBBackends.fThreadRunning || RT_FAILURE(rc));
     3119        vrc = RTThreadUserWait(mUSBBackends.thread, 60000);
     3120        AssertRC(vrc);
     3121        Assert (mUSBBackends.fThreadRunning || RT_FAILURE(vrc));
    31223122    }
    31233123}
     
    31333133        RTSemEventSignal(mUSBBackends.event);
    31343134
    3135         int rc = RTThreadWait(mUSBBackends.thread, 60000, NULL);
    3136         AssertRC(rc);
     3135        int vrc = RTThreadWait(mUSBBackends.thread, 60000, NULL);
     3136        AssertRC(vrc);
    31373137
    31383138        mUSBBackends.thread = NIL_RTTHREAD;
     
    32483248
    32493249        Bstr authResult;
    3250         HRESULT hr = mConsole->mControl->AuthenticateExternal(ComSafeArrayAsInParam(authParams),
    3251                                                               authResult.asOutParam());
    3252         LogFlowFunc(("%Rhrc [%ls]\n", hr, authResult.raw())); NOREF(hr);
     3250        HRESULT hrc = mConsole->mControl->AuthenticateExternal(ComSafeArrayAsInParam(authParams),
     3251                                                               authResult.asOutParam());
     3252        LogFlowFunc(("%Rhrc [%ls]\n", hrc, authResult.raw())); NOREF(hrc);
    32533253    }
    32543254    catch (std::bad_alloc &)
     
    32623262int ConsoleVRDPServer::lockConsoleVRDPServer(void)
    32633263{
    3264     int rc = RTCritSectEnter(&mCritSect);
    3265     AssertRC(rc);
    3266     return rc;
     3264    int vrc = RTCritSectEnter(&mCritSect);
     3265    AssertRC(vrc);
     3266    return vrc;
    32673267}
    32683268
     
    32823282                 pvCallback, u32ClientId, u32Function, u32Format, pvData, cbData));
    32833283
    3284     int rc = VINF_SUCCESS;
     3284    int vrc = VINF_SUCCESS;
    32853285
    32863286    ConsoleVRDPServer *pServer = static_cast <ConsoleVRDPServer *>(pvCallback);
     
    32943294            if (pServer->mpfnClipboardCallback)
    32953295            {
    3296                 rc = pServer->mpfnClipboardCallback(VBOX_CLIPBOARD_EXT_FN_FORMAT_ANNOUNCE,
    3297                                                     u32Format,
    3298                                                     (void *)pvData,
    3299                                                     cbData);
     3296                vrc = pServer->mpfnClipboardCallback(VBOX_CLIPBOARD_EXT_FN_FORMAT_ANNOUNCE,
     3297                                                     u32Format,
     3298                                                     (void *)pvData,
     3299                                                     cbData);
    33003300            }
    33013301        } break;
     
    33053305            if (pServer->mpfnClipboardCallback)
    33063306            {
    3307                 rc = pServer->mpfnClipboardCallback(VBOX_CLIPBOARD_EXT_FN_DATA_READ,
    3308                                                     u32Format,
    3309                                                     (void *)pvData,
    3310                                                     cbData);
     3307                vrc = pServer->mpfnClipboardCallback(VBOX_CLIPBOARD_EXT_FN_DATA_READ,
     3308                                                     u32Format,
     3309                                                     (void *)pvData,
     3310                                                     cbData);
    33113311            }
    33123312        } break;
     
    33143314        default:
    33153315        {
    3316             rc = VERR_NOT_SUPPORTED;
     3316            vrc = VERR_NOT_SUPPORTED;
    33173317        } break;
    33183318    }
    33193319
    3320     return rc;
     3320    return vrc;
    33213321}
    33223322
     
    33283328                 pvExtension, u32Function, pvParms, cbParms));
    33293329
    3330     int rc = VINF_SUCCESS;
     3330    int vrc = VINF_SUCCESS;
    33313331
    33323332    ConsoleVRDPServer *pServer = static_cast <ConsoleVRDPServer *>(pvExtension);
     
    33863386
    33873387        default:
    3388             rc = VERR_NOT_SUPPORTED;
    3389     }
    3390 
    3391     return rc;
     3388            vrc = VERR_NOT_SUPPORTED;
     3389    }
     3390
     3391    return vrc;
    33923392}
    33933393
     
    33963396    RT_NOREF(u32ClientId);
    33973397
    3398     int rc = lockConsoleVRDPServer();
    3399     if (RT_SUCCESS(rc))
     3398    int vrc = lockConsoleVRDPServer();
     3399    if (RT_SUCCESS(vrc))
    34003400    {
    34013401        if (mcClipboardRefs == 0)
    34023402        {
    3403             rc = HGCMHostRegisterServiceExtension(&mhClipboard, "VBoxSharedClipboard", ClipboardServiceExtension, this);
    3404             AssertRC(rc);
     3403            vrc = HGCMHostRegisterServiceExtension(&mhClipboard, "VBoxSharedClipboard", ClipboardServiceExtension, this);
     3404            AssertRC(vrc);
    34053405        }
    34063406
     
    34143414    RT_NOREF(u32ClientId);
    34153415
    3416     int rc = lockConsoleVRDPServer();
    3417     if (RT_SUCCESS(rc))
     3416    int vrc = lockConsoleVRDPServer();
     3417    if (RT_SUCCESS(vrc))
    34183418    {
    34193419        Assert(mcClipboardRefs);
     
    34493449
    34503450        /* Append the new instance in the list. */
    3451         int rc = lockConsoleVRDPServer();
    3452 
    3453         if (RT_SUCCESS(rc))
     3451        int vrc = lockConsoleVRDPServer();
     3452
     3453        if (RT_SUCCESS(vrc))
    34543454        {
    34553455            pRemoteUSBBackend->pNext = mUSBBackends.pHead;
     
    34733473        }
    34743474
    3475         if (RT_FAILURE(rc))
     3475        if (RT_FAILURE(vrc))
    34763476        {
    34773477            pRemoteUSBBackend->Release();
     
    34913491
    34923492    /* Find the instance. */
    3493     int rc = lockConsoleVRDPServer();
    3494 
    3495     if (RT_SUCCESS(rc))
     3493    int vrc = lockConsoleVRDPServer();
     3494
     3495    if (RT_SUCCESS(vrc))
    34963496    {
    34973497        pRemoteUSBBackend = usbBackendFind(u32ClientId);
     
    35223522
    35233523    /* Find the instance. */
    3524     int rc = lockConsoleVRDPServer();
    3525 
    3526     if (RT_SUCCESS(rc))
     3524    int vrc = lockConsoleVRDPServer();
     3525
     3526    if (RT_SUCCESS(vrc))
    35273527    {
    35283528        pRemoteUSBBackend = usbBackendFind(u32ClientId);
     
    35633563
    35643564    /* Find the instance. */
    3565     int rc = lockConsoleVRDPServer();
    3566 
    3567     if (RT_SUCCESS(rc))
     3565    int vrc = lockConsoleVRDPServer();
     3566
     3567    if (RT_SUCCESS(vrc))
    35683568    {
    35693569        pRemoteUSBBackend = usbBackendFindByUUID(pGuid);
     
    35933593#ifdef VBOX_WITH_USB
    35943594
    3595     int rc = lockConsoleVRDPServer();
    3596 
    3597     if (RT_SUCCESS(rc))
     3595    int vrc = lockConsoleVRDPServer();
     3596
     3597    if (RT_SUCCESS(vrc))
    35983598    {
    35993599        if (pRemoteUSBBackend == NULL)
     
    36673667{
    36683668#ifdef VBOX_WITH_USB
    3669     int rc = lockConsoleVRDPServer();
    3670     AssertRC(rc);
     3669    int vrc = lockConsoleVRDPServer();
     3670    AssertRC(vrc);
    36713671
    36723672    /* Exclude the found instance from the list. */
     
    38203820/* static */ int ConsoleVRDPServer::loadVRDPLibrary(const char *pszLibraryName)
    38213821{
    3822     int rc = VINF_SUCCESS;
     3822    int vrc = VINF_SUCCESS;
    38233823
    38243824    if (mVRDPLibrary == NIL_RTLDRMOD)
     
    38283828
    38293829        if (RTPathHavePath(pszLibraryName))
    3830             rc = SUPR3HardenedLdrLoadPlugIn(pszLibraryName, &mVRDPLibrary, &ErrInfo.Core);
     3830            vrc = SUPR3HardenedLdrLoadPlugIn(pszLibraryName, &mVRDPLibrary, &ErrInfo.Core);
    38313831        else
    3832             rc = SUPR3HardenedLdrLoadAppPriv(pszLibraryName, &mVRDPLibrary, RTLDRLOAD_FLAGS_LOCAL, &ErrInfo.Core);
    3833         if (RT_SUCCESS(rc))
     3832            vrc = SUPR3HardenedLdrLoadAppPriv(pszLibraryName, &mVRDPLibrary, RTLDRLOAD_FLAGS_LOCAL, &ErrInfo.Core);
     3833        if (RT_SUCCESS(vrc))
    38343834        {
    38353835            struct SymbolEntry
     
    38503850            for (unsigned i = 0; i < RT_ELEMENTS(s_aSymbols); i++)
    38513851            {
    3852                 rc = RTLdrGetSymbol(mVRDPLibrary, s_aSymbols[i].name, s_aSymbols[i].ppfn);
    3853 
    3854                 if (RT_FAILURE(rc))
     3852                vrc = RTLdrGetSymbol(mVRDPLibrary, s_aSymbols[i].name, s_aSymbols[i].ppfn);
     3853
     3854                if (RT_FAILURE(vrc))
    38553855                {
    3856                     LogRel(("VRDE: Error resolving symbol '%s', rc %Rrc.\n", s_aSymbols[i].name, rc));
     3856                    LogRel(("VRDE: Error resolving symbol '%s', vrc %Rrc.\n", s_aSymbols[i].name, vrc));
    38573857                    break;
    38583858                }
     
    38623862        {
    38633863            if (RTErrInfoIsSet(&ErrInfo.Core))
    3864                 LogRel(("VRDE: Error loading the library '%s': %s (%Rrc)\n", pszLibraryName, ErrInfo.Core.pszMsg, rc));
     3864                LogRel(("VRDE: Error loading the library '%s': %s (%Rrc)\n", pszLibraryName, ErrInfo.Core.pszMsg, vrc));
    38653865            else
    3866                 LogRel(("VRDE: Error loading the library '%s' rc = %Rrc.\n", pszLibraryName, rc));
     3866                LogRel(("VRDE: Error loading the library '%s' vrc = %Rrc.\n", pszLibraryName, vrc));
    38673867
    38683868            mVRDPLibrary = NIL_RTLDRMOD;
     
    38703870    }
    38713871
    3872     if (RT_FAILURE(rc))
     3872    if (RT_FAILURE(vrc))
    38733873    {
    38743874        if (mVRDPLibrary != NIL_RTLDRMOD)
     
    38793879    }
    38803880
    3881     return rc;
     3881    return vrc;
    38823882}
    38833883
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