- Timestamp:
- May 9, 2022 2:22:27 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151368
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp
r93115 r94960 564 564 ConsoleVRDPServer *server = static_cast<ConsoleVRDPServer*>(pvCallback); 565 565 566 int rc = VERR_NOT_SUPPORTED;566 int vrc = VERR_NOT_SUPPORTED; 567 567 568 568 switch (index) … … 576 576 { 577 577 *(uint32_t *)pvBuffer = (uint32_t)port; 578 rc = VINF_SUCCESS;578 vrc = VINF_SUCCESS; 579 579 } 580 580 else 581 581 { 582 rc = VINF_BUFFER_OVERFLOW;582 vrc = VINF_BUFFER_OVERFLOW; 583 583 } 584 584 … … 599 599 { 600 600 /* More than 64K seems to be an invalid address. */ 601 rc = VERR_TOO_MUCH_DATA;601 vrc = VERR_TOO_MUCH_DATA; 602 602 break; 603 603 } … … 606 606 { 607 607 memcpy(pvBuffer, address.c_str(), cbAddress); 608 rc = VINF_SUCCESS;608 vrc = VINF_SUCCESS; 609 609 } 610 610 else 611 611 { 612 rc = VINF_BUFFER_OVERFLOW;612 vrc = VINF_BUFFER_OVERFLOW; 613 613 } 614 614 … … 623 623 { 624 624 *(uint32_t *)pvBuffer = (uint32_t)cMonitors; 625 rc = VINF_SUCCESS;625 vrc = VINF_SUCCESS; 626 626 } 627 627 else 628 628 { 629 rc = VINF_BUFFER_OVERFLOW;629 vrc = VINF_BUFFER_OVERFLOW; 630 630 } 631 631 … … 656 656 { 657 657 /* More than 64K seems to be an invalid port range string. */ 658 rc = VERR_TOO_MUCH_DATA;658 vrc = VERR_TOO_MUCH_DATA; 659 659 break; 660 660 } … … 663 663 { 664 664 memcpy(pvBuffer, portRange.c_str(), cbPortRange); 665 rc = VINF_SUCCESS;665 vrc = VINF_SUCCESS; 666 666 } 667 667 else 668 668 { 669 rc = VINF_BUFFER_OVERFLOW;669 vrc = VINF_BUFFER_OVERFLOW; 670 670 } 671 671 … … 692 692 { 693 693 *(uint32_t *)pvBuffer = (uint32_t)fVideoEnabled; 694 rc = VINF_SUCCESS;694 vrc = VINF_SUCCESS; 695 695 } 696 696 else 697 697 { 698 rc = VINF_BUFFER_OVERFLOW;698 vrc = VINF_BUFFER_OVERFLOW; 699 699 } 700 700 … … 720 720 { 721 721 *(uint32_t *)pvBuffer = (uint32_t)ulQuality; 722 rc = VINF_SUCCESS;722 vrc = VINF_SUCCESS; 723 723 } 724 724 else 725 725 { 726 rc = VINF_BUFFER_OVERFLOW;726 vrc = VINF_BUFFER_OVERFLOW; 727 727 } 728 728 … … 749 749 { 750 750 *(uint32_t *)pvBuffer = (uint32_t)ulSunFlsh; 751 rc = VINF_SUCCESS;751 vrc = VINF_SUCCESS; 752 752 } 753 753 else 754 754 { 755 rc = VINF_BUFFER_OVERFLOW;755 vrc = VINF_BUFFER_OVERFLOW; 756 756 } 757 757 … … 763 763 if (cbBuffer < sizeof(VRDEFEATURE)) 764 764 { 765 rc = VERR_INVALID_PARAMETER;765 vrc = VERR_INVALID_PARAMETER; 766 766 break; 767 767 } … … 772 772 773 773 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; 779 779 break; 780 780 } … … 810 810 if (FAILED(hrc)) 811 811 { 812 rc = VERR_NOT_SUPPORTED;812 vrc = VERR_NOT_SUPPORTED; 813 813 } 814 814 } … … 822 822 if (FAILED(hrc)) 823 823 { 824 rc = VERR_NOT_SUPPORTED;824 vrc = VERR_NOT_SUPPORTED; 825 825 } 826 826 } 827 827 else 828 828 { 829 rc = VERR_NOT_SUPPORTED;829 vrc = VERR_NOT_SUPPORTED; 830 830 } 831 831 832 832 /* Copy the value string to the callers buffer. */ 833 if ( rc == VINF_SUCCESS)833 if (vrc == VINF_SUCCESS) 834 834 { 835 835 com::Utf8Str value = bstrValue; … … 843 843 else 844 844 { 845 rc = VINF_BUFFER_OVERFLOW;845 vrc = VINF_BUFFER_OVERFLOW; 846 846 } 847 847 … … 854 854 if (cbBuffer != sizeof(uint32_t)) 855 855 { 856 rc = VERR_INVALID_PARAMETER;856 vrc = VERR_INVALID_PARAMETER; 857 857 break; 858 858 } … … 862 862 server->mVRDPBindPort = port; 863 863 864 rc = VINF_SUCCESS;864 vrc = VINF_SUCCESS; 865 865 866 866 if (pcbOut) … … 876 876 if (cbBuffer < sizeof(VRDECLIENTSTATUS)) 877 877 { 878 rc = VERR_INVALID_PARAMETER;878 vrc = VERR_INVALID_PARAMETER; 879 879 break; 880 880 } … … 886 886 if (cbBuffer < RT_UOFFSETOF(VRDECLIENTSTATUS, achStatus) + pStatus->cbStatus) 887 887 { 888 rc = VERR_INVALID_PARAMETER;888 vrc = VERR_INVALID_PARAMETER; 889 889 break; 890 890 } 891 891 892 892 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; 898 898 break; 899 899 } … … 903 903 server->mConsole->i_VRDPClientStatusChange(pStatus->u32ClientId, pStatus->achStatus); 904 904 905 rc = VINF_SUCCESS;905 vrc = VINF_SUCCESS; 906 906 907 907 if (pcbOut) … … 917 917 } 918 918 919 return rc;919 return vrc; 920 920 } 921 921 … … 990 990 LogFlowFunc(("%x\n", fu32Intercept)); 991 991 992 int rc = VERR_NOT_SUPPORTED;992 int vrc = VERR_NOT_SUPPORTED; 993 993 994 994 switch (fu32Intercept) … … 1001 1001 *ppvIntercept = pServer; 1002 1002 } 1003 rc = VINF_SUCCESS;1003 vrc = VINF_SUCCESS; 1004 1004 } break; 1005 1005 … … 1007 1007 { 1008 1008 pServer->mConsole->i_VRDPInterceptUSB(u32ClientId, ppvIntercept); 1009 rc = VINF_SUCCESS;1009 vrc = VINF_SUCCESS; 1010 1010 } break; 1011 1011 … … 1017 1017 *ppvIntercept = pServer; 1018 1018 } 1019 rc = VINF_SUCCESS;1019 vrc = VINF_SUCCESS; 1020 1020 } break; 1021 1021 … … 1039 1039 { 1040 1040 Log(("AUDIOIN: ignored client %RU32, active client %RU32\n", u32ClientId, pServer->mu32AudioInputClientId)); 1041 rc = VERR_NOT_SUPPORTED;1041 vrc = VERR_NOT_SUPPORTED; 1042 1042 } 1043 1043 } break; … … 1047 1047 } 1048 1048 1049 return rc;1049 return vrc; 1050 1050 } 1051 1051 … … 1340 1340 mConsole = console; 1341 1341 1342 int rc = RTCritSectInit(&mCritSect);1343 AssertRC( rc);1342 int vrc = RTCritSectInit(&mCritSect); 1343 AssertRC(vrc); 1344 1344 1345 1345 mcClipboardRefs = 0; … … 1413 1413 RT_ZERO(m_interfaceCallbacksInput); 1414 1414 1415 rc = RTCritSectInit(&mTSMFLock);1416 AssertRC( rc);1415 vrc = RTCritSectInit(&mTSMFLock); 1416 AssertRC(vrc); 1417 1417 1418 1418 mEmWebcam = new EmWebcam(this); … … 1892 1892 else 1893 1893 { 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); 1897 1897 if (RT_SUCCESS(rc)) 1898 1898 { … … 1924 1924 uint32_t fu32CompletionFlags = 0; 1925 1925 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_3D1931 | 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); 1937 1937 if (RT_FAILURE(rc)) 1938 1938 { … … 1941 1941 fu32CompletionFlags = 0; 1942 1942 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); 1953 1953 } 1954 1954 1955 1955 H3DORLOG(("H3DORGeometry: Image handle create %Rrc, flags 0x%RX32\n", rc, fu32CompletionFlags)); 1956 1956 1957 if (RT_SUCCESS( rc))1957 if (RT_SUCCESS(vrc)) 1958 1958 { 1959 1959 p->x = x; … … 2063 2063 { 2064 2064 RT_NOREF(pvContext, pvBuffer); 2065 int rc = VINF_SUCCESS;2065 int vrc = VINF_SUCCESS; 2066 2066 2067 2067 H3DORLOG(("H3DORContextProperty: index %d\n", index)); … … 2084 2084 else 2085 2085 { 2086 rc = VERR_BUFFER_OVERFLOW;2086 vrc = VERR_BUFFER_OVERFLOW; 2087 2087 } 2088 2088 *pcbOut = cbOut; … … 2090 2090 else 2091 2091 { 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; 2097 2097 } 2098 2098 #endif … … 2212 2212 2213 2213 /* static */ DECLCALLBACK(int) ConsoleVRDPServer::VRDESCardCbResponse(void *pvContext, 2214 int rcRequest,2214 int vrcRequest, 2215 2215 void *pvUser, 2216 2216 uint32_t u32Function, … … 2221 2221 ConsoleVRDPServer *pThis = static_cast<ConsoleVRDPServer*>(pvContext); 2222 2222 UsbCardReader *pReader = pThis->mConsole->i_getUsbCardReader(); 2223 return pReader->VRDEResponse( rcRequest, pvUser, u32Function, pvData, cbData);2223 return pReader->VRDEResponse(vrcRequest, pvUser, u32Function, pvData, cbData); 2224 2224 #else 2225 2225 NOREF(pvContext); 2226 NOREF( rcRequest);2226 NOREF(vrcRequest); 2227 2227 NOREF(pvUser); 2228 2228 NOREF(u32Function); … … 2235 2235 int ConsoleVRDPServer::SCardRequest(void *pvUser, uint32_t u32Function, const void *pvData, uint32_t cbData) 2236 2236 { 2237 int rc = VINF_SUCCESS;2237 int vrc = VINF_SUCCESS; 2238 2238 2239 2239 if (mhServer && mpEntryPoints && m_interfaceSCard.VRDESCardRequest) 2240 2240 { 2241 rc = m_interfaceSCard.VRDESCardRequest(mhServer, pvUser, u32Function, pvData, cbData);2241 vrc = m_interfaceSCard.VRDESCardRequest(mhServer, pvUser, u32Function, pvData, cbData); 2242 2242 } 2243 2243 else 2244 2244 { 2245 rc = VERR_NOT_SUPPORTED;2246 } 2247 2248 return rc;2245 vrc = VERR_NOT_SUPPORTED; 2246 } 2247 2248 return vrc; 2249 2249 } 2250 2250 … … 2298 2298 int ConsoleVRDPServer::tsmfLock(void) 2299 2299 { 2300 int rc = RTCritSectEnter(&mTSMFLock);2301 AssertRC( rc);2302 return rc;2300 int vrc = RTCritSectEnter(&mTSMFLock); 2301 AssertRC(vrc); 2302 return vrc; 2303 2303 } 2304 2304 … … 2322 2322 TSMFVRDPCTX *pVRDPCtx = NULL; 2323 2323 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; 2328 2328 } 2329 2329 … … 2336 2336 pVRDPCtx->pHostChCtx = pHostChCtx; 2337 2337 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)) 2341 2341 { 2342 2342 /** @todo contexts should be in a list for accounting. */ … … 2349 2349 } 2350 2350 2351 return rc;2351 return vrc; 2352 2352 } 2353 2353 … … 2359 2359 ConsoleVRDPServer *pThis = pHostChCtx->pThis; 2360 2360 2361 int rc = pThis->tsmfLock();2362 if (RT_SUCCESS( rc))2361 int vrc = pThis->tsmfLock(); 2362 if (RT_SUCCESS(vrc)) 2363 2363 { 2364 2364 bool fClose = false; … … 2398 2398 ConsoleVRDPServer *pThis = pHostChCtx->pThis; 2399 2399 2400 int rc = pThis->tsmfLock();2401 if (RT_SUCCESS( rc))2400 int vrc = pThis->tsmfLock(); 2401 if (RT_SUCCESS(vrc)) 2402 2402 { 2403 2403 bool fSend = false; … … 2415 2415 { 2416 2416 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; 2423 2423 } 2424 2424 … … 2434 2434 ConsoleVRDPServer *pThis = pHostChCtx->pThis; 2435 2435 2436 int rc = pThis->tsmfLock();2437 if (RT_SUCCESS( rc))2436 int vrc = pThis->tsmfLock(); 2437 if (RT_SUCCESS(vrc)) 2438 2438 { 2439 2439 uint32_t cbToCopy = RT_MIN(cbData, pHostChCtx->cbDataReceived); … … 2460 2460 } 2461 2461 2462 return rc;2462 return vrc; 2463 2463 } 2464 2464 … … 2529 2529 } 2530 2530 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)); 2539 2539 return; 2540 2540 } … … 2557 2557 { 2558 2558 RT_NOREF(cbParm); 2559 int rc = VINF_SUCCESS;2559 int vrc = VINF_SUCCESS; 2560 2560 2561 2561 ConsoleVRDPServer *pThis = static_cast<ConsoleVRDPServer*>(pvContext); … … 2608 2608 ev.u32SizeAvailable = 0; 2609 2609 2610 rc = pThis->tsmfLock();2611 2612 if (RT_SUCCESS( rc))2610 vrc = pThis->tsmfLock(); 2611 2612 if (RT_SUCCESS(vrc)) 2613 2613 { 2614 2614 TSMFHOSTCHCTX *pHostChCtx = pVRDPCtx->pHostChCtx; … … 2662 2662 pVRDPCtx->pvCallbacks = NULL; 2663 2663 2664 rc = pThis->tsmfLock();2665 if (RT_SUCCESS( rc))2664 vrc = pThis->tsmfLock(); 2665 if (RT_SUCCESS(vrc)) 2666 2666 { 2667 2667 if (pVRDPCtx->pHostChCtx) … … 2698 2698 2699 2699 /* static */ DECLCALLBACK(void) ConsoleVRDPServer::VRDECallbackVideoInDeviceDesc(void *pvCallback, 2700 int rcRequest,2700 int vrcRequest, 2701 2701 void *pDeviceCtx, 2702 2702 void *pvUser, … … 2707 2707 if (pThis->mEmWebcam) 2708 2708 { 2709 pThis->mEmWebcam->EmWebcamCbDeviceDesc( rcRequest, pDeviceCtx, pvUser, pDeviceDesc, cbDevice);2709 pThis->mEmWebcam->EmWebcamCbDeviceDesc(vrcRequest, pDeviceCtx, pvUser, pDeviceDesc, cbDevice); 2710 2710 } 2711 2711 } 2712 2712 2713 2713 /* static */ DECLCALLBACK(void) ConsoleVRDPServer::VRDECallbackVideoInControl(void *pvCallback, 2714 int rcRequest,2714 int vrcRequest, 2715 2715 void *pDeviceCtx, 2716 2716 void *pvUser, … … 2721 2721 if (pThis->mEmWebcam) 2722 2722 { 2723 pThis->mEmWebcam->EmWebcamCbControl( rcRequest, pDeviceCtx, pvUser, pControl, cbControl);2723 pThis->mEmWebcam->EmWebcamCbControl(vrcRequest, pDeviceCtx, pvUser, pControl, cbControl); 2724 2724 } 2725 2725 } 2726 2726 2727 2727 /* static */ DECLCALLBACK(void) ConsoleVRDPServer::VRDECallbackVideoInFrame(void *pvCallback, 2728 int rcRequest,2728 int vrcRequest, 2729 2729 void *pDeviceCtx, 2730 2730 const VRDEVIDEOINPAYLOADHDR *pFrame, … … 2734 2734 if (pThis->mEmWebcam) 2735 2735 { 2736 pThis->mEmWebcam->EmWebcamCbFrame( rcRequest, pDeviceCtx, pFrame, cbFrame);2736 pThis->mEmWebcam->EmWebcamCbFrame(vrcRequest, pDeviceCtx, pFrame, cbFrame); 2737 2737 } 2738 2738 } … … 2740 2740 int ConsoleVRDPServer::VideoInDeviceAttach(const VRDEVIDEOINDEVICEHANDLE *pDeviceHandle, void *pvDeviceCtx) 2741 2741 { 2742 int rc;2742 int vrc; 2743 2743 2744 2744 if (mhServer && mpEntryPoints && m_interfaceVideoIn.VRDEVideoInDeviceAttach) 2745 2745 { 2746 rc = m_interfaceVideoIn.VRDEVideoInDeviceAttach(mhServer, pDeviceHandle, pvDeviceCtx);2746 vrc = m_interfaceVideoIn.VRDEVideoInDeviceAttach(mhServer, pDeviceHandle, pvDeviceCtx); 2747 2747 } 2748 2748 else 2749 2749 { 2750 rc = VERR_NOT_SUPPORTED;2751 } 2752 2753 return rc;2750 vrc = VERR_NOT_SUPPORTED; 2751 } 2752 2753 return vrc; 2754 2754 } 2755 2755 2756 2756 int ConsoleVRDPServer::VideoInDeviceDetach(const VRDEVIDEOINDEVICEHANDLE *pDeviceHandle) 2757 2757 { 2758 int rc;2758 int vrc; 2759 2759 2760 2760 if (mhServer && mpEntryPoints && m_interfaceVideoIn.VRDEVideoInDeviceDetach) 2761 2761 { 2762 rc = m_interfaceVideoIn.VRDEVideoInDeviceDetach(mhServer, pDeviceHandle);2762 vrc = m_interfaceVideoIn.VRDEVideoInDeviceDetach(mhServer, pDeviceHandle); 2763 2763 } 2764 2764 else 2765 2765 { 2766 rc = VERR_NOT_SUPPORTED;2767 } 2768 2769 return rc;2766 vrc = VERR_NOT_SUPPORTED; 2767 } 2768 2769 return vrc; 2770 2770 } 2771 2771 2772 2772 int ConsoleVRDPServer::VideoInGetDeviceDesc(void *pvUser, const VRDEVIDEOINDEVICEHANDLE *pDeviceHandle) 2773 2773 { 2774 int rc;2774 int vrc; 2775 2775 2776 2776 if (mhServer && mpEntryPoints && m_interfaceVideoIn.VRDEVideoInGetDeviceDesc) 2777 2777 { 2778 rc = m_interfaceVideoIn.VRDEVideoInGetDeviceDesc(mhServer, pvUser, pDeviceHandle);2778 vrc = m_interfaceVideoIn.VRDEVideoInGetDeviceDesc(mhServer, pvUser, pDeviceHandle); 2779 2779 } 2780 2780 else 2781 2781 { 2782 rc = VERR_NOT_SUPPORTED;2783 } 2784 2785 return rc;2782 vrc = VERR_NOT_SUPPORTED; 2783 } 2784 2785 return vrc; 2786 2786 } 2787 2787 … … 2789 2789 const VRDEVIDEOINCTRLHDR *pReq, uint32_t cbReq) 2790 2790 { 2791 int rc;2791 int vrc; 2792 2792 2793 2793 if (mhServer && mpEntryPoints && m_interfaceVideoIn.VRDEVideoInControl) 2794 2794 { 2795 rc = m_interfaceVideoIn.VRDEVideoInControl(mhServer, pvUser, pDeviceHandle, pReq, cbReq);2795 vrc = m_interfaceVideoIn.VRDEVideoInControl(mhServer, pvUser, pDeviceHandle, pReq, cbReq); 2796 2796 } 2797 2797 else 2798 2798 { 2799 rc = VERR_NOT_SUPPORTED;2800 } 2801 2802 return rc;2799 vrc = VERR_NOT_SUPPORTED; 2800 } 2801 2802 return vrc; 2803 2803 } 2804 2804 2805 2805 2806 2806 /* static */ DECLCALLBACK(void) ConsoleVRDPServer::VRDECallbackInputSetup(void *pvCallback, 2807 int rcRequest,2807 int vrcRequest, 2808 2808 uint32_t u32Method, 2809 2809 const void *pvResult, … … 2811 2811 { 2812 2812 NOREF(pvCallback); 2813 NOREF( rcRequest);2813 NOREF(vrcRequest); 2814 2814 NOREF(u32Method); 2815 2815 NOREF(pvResult); … … 2921 2921 const uint8_t *pu8Shape) 2922 2922 { 2923 int rc = VINF_SUCCESS;2923 int vrc = VINF_SUCCESS; 2924 2924 2925 2925 if (mhServer && mpEntryPoints && m_interfaceMousePtr.VRDEMousePtr) … … 2960 2960 else 2961 2961 { 2962 rc = VERR_NO_MEMORY;2962 vrc = VERR_NO_MEMORY; 2963 2963 } 2964 2964 } 2965 2965 else 2966 2966 { 2967 rc = VERR_NOT_SUPPORTED;2968 } 2969 2970 return rc;2967 vrc = VERR_NOT_SUPPORTED; 2968 } 2969 2970 return vrc; 2971 2971 } 2972 2972 … … 3077 3077 mUSBBackends.thread = thread; 3078 3078 mUSBBackends.fThreadRunning = true; 3079 int rc = RTThreadUserSignal(thread);3080 AssertRC( rc);3079 int vrc = RTThreadUserSignal(thread); 3080 AssertRC(vrc); 3081 3081 } 3082 3082 … … 3088 3088 void ConsoleVRDPServer::waitRemoteUSBThreadEvent(RTMSINTERVAL cMillies) 3089 3089 { 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); 3093 3093 } 3094 3094 3095 3095 void ConsoleVRDPServer::remoteUSBThreadStart(void) 3096 3096 { 3097 int rc = RTSemEventCreate(&mUSBBackends.event);3098 3099 if (RT_FAILURE( rc))3097 int vrc = RTSemEventCreate(&mUSBBackends.event); 3098 3099 if (RT_FAILURE(vrc)) 3100 3100 { 3101 3101 AssertFailed(); … … 3103 3103 } 3104 3104 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, 3108 3108 RTTHREADTYPE_VRDP_IO, RTTHREADFLAGS_WAITABLE, "remote usb"); 3109 3109 } 3110 3110 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)); 3114 3114 mUSBBackends.thread = NIL_RTTHREAD; 3115 3115 } … … 3117 3117 { 3118 3118 /* 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)); 3122 3122 } 3123 3123 } … … 3133 3133 RTSemEventSignal(mUSBBackends.event); 3134 3134 3135 int rc = RTThreadWait(mUSBBackends.thread, 60000, NULL);3136 AssertRC( rc);3135 int vrc = RTThreadWait(mUSBBackends.thread, 60000, NULL); 3136 AssertRC(vrc); 3137 3137 3138 3138 mUSBBackends.thread = NIL_RTTHREAD; … … 3248 3248 3249 3249 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); 3253 3253 } 3254 3254 catch (std::bad_alloc &) … … 3262 3262 int ConsoleVRDPServer::lockConsoleVRDPServer(void) 3263 3263 { 3264 int rc = RTCritSectEnter(&mCritSect);3265 AssertRC( rc);3266 return rc;3264 int vrc = RTCritSectEnter(&mCritSect); 3265 AssertRC(vrc); 3266 return vrc; 3267 3267 } 3268 3268 … … 3282 3282 pvCallback, u32ClientId, u32Function, u32Format, pvData, cbData)); 3283 3283 3284 int rc = VINF_SUCCESS;3284 int vrc = VINF_SUCCESS; 3285 3285 3286 3286 ConsoleVRDPServer *pServer = static_cast <ConsoleVRDPServer *>(pvCallback); … … 3294 3294 if (pServer->mpfnClipboardCallback) 3295 3295 { 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); 3300 3300 } 3301 3301 } break; … … 3305 3305 if (pServer->mpfnClipboardCallback) 3306 3306 { 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); 3311 3311 } 3312 3312 } break; … … 3314 3314 default: 3315 3315 { 3316 rc = VERR_NOT_SUPPORTED;3316 vrc = VERR_NOT_SUPPORTED; 3317 3317 } break; 3318 3318 } 3319 3319 3320 return rc;3320 return vrc; 3321 3321 } 3322 3322 … … 3328 3328 pvExtension, u32Function, pvParms, cbParms)); 3329 3329 3330 int rc = VINF_SUCCESS;3330 int vrc = VINF_SUCCESS; 3331 3331 3332 3332 ConsoleVRDPServer *pServer = static_cast <ConsoleVRDPServer *>(pvExtension); … … 3386 3386 3387 3387 default: 3388 rc = VERR_NOT_SUPPORTED;3389 } 3390 3391 return rc;3388 vrc = VERR_NOT_SUPPORTED; 3389 } 3390 3391 return vrc; 3392 3392 } 3393 3393 … … 3396 3396 RT_NOREF(u32ClientId); 3397 3397 3398 int rc = lockConsoleVRDPServer();3399 if (RT_SUCCESS( rc))3398 int vrc = lockConsoleVRDPServer(); 3399 if (RT_SUCCESS(vrc)) 3400 3400 { 3401 3401 if (mcClipboardRefs == 0) 3402 3402 { 3403 rc = HGCMHostRegisterServiceExtension(&mhClipboard, "VBoxSharedClipboard", ClipboardServiceExtension, this);3404 AssertRC( rc);3403 vrc = HGCMHostRegisterServiceExtension(&mhClipboard, "VBoxSharedClipboard", ClipboardServiceExtension, this); 3404 AssertRC(vrc); 3405 3405 } 3406 3406 … … 3414 3414 RT_NOREF(u32ClientId); 3415 3415 3416 int rc = lockConsoleVRDPServer();3417 if (RT_SUCCESS( rc))3416 int vrc = lockConsoleVRDPServer(); 3417 if (RT_SUCCESS(vrc)) 3418 3418 { 3419 3419 Assert(mcClipboardRefs); … … 3449 3449 3450 3450 /* 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)) 3454 3454 { 3455 3455 pRemoteUSBBackend->pNext = mUSBBackends.pHead; … … 3473 3473 } 3474 3474 3475 if (RT_FAILURE( rc))3475 if (RT_FAILURE(vrc)) 3476 3476 { 3477 3477 pRemoteUSBBackend->Release(); … … 3491 3491 3492 3492 /* Find the instance. */ 3493 int rc = lockConsoleVRDPServer();3494 3495 if (RT_SUCCESS( rc))3493 int vrc = lockConsoleVRDPServer(); 3494 3495 if (RT_SUCCESS(vrc)) 3496 3496 { 3497 3497 pRemoteUSBBackend = usbBackendFind(u32ClientId); … … 3522 3522 3523 3523 /* Find the instance. */ 3524 int rc = lockConsoleVRDPServer();3525 3526 if (RT_SUCCESS( rc))3524 int vrc = lockConsoleVRDPServer(); 3525 3526 if (RT_SUCCESS(vrc)) 3527 3527 { 3528 3528 pRemoteUSBBackend = usbBackendFind(u32ClientId); … … 3563 3563 3564 3564 /* Find the instance. */ 3565 int rc = lockConsoleVRDPServer();3566 3567 if (RT_SUCCESS( rc))3565 int vrc = lockConsoleVRDPServer(); 3566 3567 if (RT_SUCCESS(vrc)) 3568 3568 { 3569 3569 pRemoteUSBBackend = usbBackendFindByUUID(pGuid); … … 3593 3593 #ifdef VBOX_WITH_USB 3594 3594 3595 int rc = lockConsoleVRDPServer();3596 3597 if (RT_SUCCESS( rc))3595 int vrc = lockConsoleVRDPServer(); 3596 3597 if (RT_SUCCESS(vrc)) 3598 3598 { 3599 3599 if (pRemoteUSBBackend == NULL) … … 3667 3667 { 3668 3668 #ifdef VBOX_WITH_USB 3669 int rc = lockConsoleVRDPServer();3670 AssertRC( rc);3669 int vrc = lockConsoleVRDPServer(); 3670 AssertRC(vrc); 3671 3671 3672 3672 /* Exclude the found instance from the list. */ … … 3820 3820 /* static */ int ConsoleVRDPServer::loadVRDPLibrary(const char *pszLibraryName) 3821 3821 { 3822 int rc = VINF_SUCCESS;3822 int vrc = VINF_SUCCESS; 3823 3823 3824 3824 if (mVRDPLibrary == NIL_RTLDRMOD) … … 3828 3828 3829 3829 if (RTPathHavePath(pszLibraryName)) 3830 rc = SUPR3HardenedLdrLoadPlugIn(pszLibraryName, &mVRDPLibrary, &ErrInfo.Core);3830 vrc = SUPR3HardenedLdrLoadPlugIn(pszLibraryName, &mVRDPLibrary, &ErrInfo.Core); 3831 3831 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)) 3834 3834 { 3835 3835 struct SymbolEntry … … 3850 3850 for (unsigned i = 0; i < RT_ELEMENTS(s_aSymbols); i++) 3851 3851 { 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)) 3855 3855 { 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)); 3857 3857 break; 3858 3858 } … … 3862 3862 { 3863 3863 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)); 3865 3865 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)); 3867 3867 3868 3868 mVRDPLibrary = NIL_RTLDRMOD; … … 3870 3870 } 3871 3871 3872 if (RT_FAILURE( rc))3872 if (RT_FAILURE(vrc)) 3873 3873 { 3874 3874 if (mVRDPLibrary != NIL_RTLDRMOD) … … 3879 3879 } 3880 3880 3881 return rc;3881 return vrc; 3882 3882 } 3883 3883
Note:
See TracChangeset
for help on using the changeset viewer.