VirtualBox

Changeset 51224 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
May 9, 2014 11:16:06 AM (11 years ago)
Author:
vboxsync
Message:

Additions/VBoxGuest: remove VRDP session handling (never really used), cleanup

Location:
trunk/src/VBox/Additions
Files:
2 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/Makefile.kmk

    r50460 r51224  
    3737        VBoxDisplay.cpp \
    3838        VBoxVRDP.cpp \
    39         VBoxRestore.cpp \
    4039        VBoxIPC.cpp \
    4140        VBoxHelpers.cpp \
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp

    r49891 r51224  
    177177        VBoxSeamlessDestroy
    178178    },
    179 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING
    180     {
    181         "Restore",
    182         VBoxRestoreInit,
    183         VBoxRestoreThread,
    184         NULL /* pfnStop */,
    185         VBoxRestoreDestroy
    186     },
    187 #endif
    188179    {
    189180        "VRDP",
     
    11751166            return 0;
    11761167
    1177         case WM_VBOXTRAY_VM_RESTORED:
    1178             VBoxRestoreSession();
    1179             return 0;
    1180 
    1181         case WM_VBOXTRAY_VRDP_CHECK:
    1182             VBoxRestoreCheckVRDP();
    1183             return 0;
    1184 
    11851168        case WM_WTSSESSION_CHANGE:
    11861169        {
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.h

    r48070 r51224  
    7474 */
    7575#define WM_VBOXTRAY_TRAY_ICON                   WM_APP + 40
    76 /**
    77  * VM/VMMDev related messsages.
    78  */
    79 #define WM_VBOXTRAY_VM_RESTORED                 WM_APP + 100
    80 /**
    81  * VRDP messages.
    82  */
    83 #define WM_VBOXTRAY_VRDP_CHECK                  WM_APP + 301
    8476
    8577
  • trunk/src/VBox/Additions/WINNT/include/VBoxGuestInternal.h

    r44528 r51224  
    1616#define __VBoxGuestInternal_h__
    1717
    18 /** Uncomment to enable VRDP status checks */
    19 //#define VBOX_WITH_VRDP_SESSION_HANDLING
    20 
    21 /** Uncomment to enable the guest management extension in VBoxService */
    22 #define VBOX_WITH_MANAGEMENT
    23 
    24 /** IOCTL for VBoxGuest to enable a VRDP session */
    25 #define VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION     IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2100, METHOD_BUFFERED, FILE_WRITE_ACCESS, 0)
    26 
    27 /** IOCTL for VBoxGuest to disable a VRDP session */
    28 #define VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION    IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2101, METHOD_BUFFERED, FILE_WRITE_ACCESS, 0)
    29 
     18/* no global definitions right now */
    3019
    3120#endif /* __VBoxGuestInternal_h__ */
  • trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk

    r50822 r51224  
    3838 VBoxGuest_DEFS.linux    = KBUILD_MODNAME=KBUILD_STR\(vboxguest\) KBUILD_BASENAME=KBUILD_STR\(vboxguest\) DEBUG_HASH=2 DEBUG_HASH2=3 EXPORT_SYMTAB
    3939 VBoxGuest_DEFS.solaris  = VBOX_SVN_REV=$(VBOX_SVN_REV)
    40  VBoxGuest_DEFS.win      = VBOX_GUESTDRV_WITH_RELEASE_LOGGER # VBOX_WITH_VRDP_SESSION_HANDLING
     40 VBoxGuest_DEFS.win      = VBOX_GUESTDRV_WITH_RELEASE_LOGGER
    4141 VBoxGuest_DEFS.darwin   = VBOX_GUESTDRV_WITH_RELEASE_LOGGER
    4242 ifeq ($(KBUILD_TYPE),release)
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp

    r50822 r51224  
    742742    }
    743743
    744     /*
    745      * First process Windows specific stuff which cannot be handled
    746      * by the common code used on all other platforms. In the default case
    747      * we then finally handle the common cases.
    748      */
    749     switch (uCmd)
    750     {
    751 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING
    752         case VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION:
     744    /* Verify that it's a buffered CTL. */
     745    if ((pStack->Parameters.DeviceIoControl.IoControlCode & 0x3) == METHOD_BUFFERED)
     746    {
     747        /*
     748         * Process the common IOCtls.
     749         */
     750        size_t cbDataReturned;
     751        int vrc = VBoxGuestCommonIOCtl(uCmd, &pDevExt->Core, pSession, pBuf, cbData, &cbDataReturned);
     752
     753        LogFlowFunc(("rc=%Rrc, pBuf=0x%p, cbData=%u, cbDataReturned=%u\n",
     754                     vrc, pBuf, cbData, cbDataReturned));
     755
     756        if (RT_SUCCESS(vrc))
    753757        {
    754             LogRelFunc(("ENABLE_VRDP_SESSION: Currently: %sabled\n",
    755                         pDevExt->fVRDPEnabled? "en": "dis"));
    756             if (!pDevExt->fVRDPEnabled)
     758            if (RT_UNLIKELY(   cbDataReturned > cbData
     759                            || cbDataReturned > pStack->Parameters.DeviceIoControl.OutputBufferLength))
    757760            {
    758                 KUSER_SHARED_DATA *pSharedUserData = (KUSER_SHARED_DATA *)KI_USER_SHARED_DATA;
    759 
    760                 pDevExt->fVRDPEnabled            = true;
    761                 LogRelFunc(("ENABLE_VRDP_SESSION: Current active console ID: 0x%08X\n",
    762                             pSharedUserData->ActiveConsoleId));
    763                 pDevExt->ulOldActiveConsoleId    = pSharedUserData->ActiveConsoleId;
    764                 pSharedUserData->ActiveConsoleId = 2;
     761                LogFlowFunc(("Too much output data %u - expected %u!\n", cbDataReturned, cbData));
     762                cbDataReturned = cbData;
     763                Status = STATUS_BUFFER_TOO_SMALL;
    765764            }
    766             break;
     765            if (cbDataReturned > 0)
     766                cbOut = cbDataReturned;
    767767        }
    768 
    769         case VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION:
     768        else
    770769        {
    771             LogRelFunc(("DISABLE_VRDP_SESSION: Currently: %sabled\n",
    772                         pDevExt->fVRDPEnabled? "en": "dis"));
    773             if (pDevExt->fVRDPEnabled)
    774             {
    775                 KUSER_SHARED_DATA *pSharedUserData = (KUSER_SHARED_DATA *)KI_USER_SHARED_DATA;
    776 
    777                 pDevExt->fVRDPEnabled            = false;
    778                 LogFlowFunc(("DISABLE_VRDP_SESSION: Current active console ID: 0x%08X\n",
    779                              pSharedUserData->ActiveConsoleId));
    780                 pSharedUserData->ActiveConsoleId = pDevExt->ulOldActiveConsoleId;
    781                 pDevExt->ulOldActiveConsoleId    = 0;
    782             }
    783             break;
     770            if (   vrc == VERR_NOT_SUPPORTED
     771                || vrc == VERR_INVALID_PARAMETER)
     772                Status = STATUS_INVALID_PARAMETER;
     773            else if (vrc == VERR_OUT_OF_RANGE)
     774                Status = STATUS_INVALID_BUFFER_SIZE;
     775            else
     776                Status = STATUS_UNSUCCESSFUL;
    784777        }
    785 #else
    786         /* Add at least one (bogus) fall through case to shut up MSVC! */
    787         case 0:
    788 #endif
    789         default:
    790         {
    791             /*
    792              * Process the common IOCtls.
    793              */
    794             size_t cbDataReturned;
    795             int vrc = VBoxGuestCommonIOCtl(uCmd, &pDevExt->Core, pSession, pBuf, cbData, &cbDataReturned);
    796 
    797             LogFlowFunc(("rc=%Rrc, pBuf=0x%p, cbData=%u, cbDataReturned=%u\n",
    798                          vrc, pBuf, cbData, cbDataReturned));
    799 
    800             if (RT_SUCCESS(vrc))
    801             {
    802                 if (RT_UNLIKELY(cbDataReturned > cbData))
    803                 {
    804                     LogFlowFunc(("Too much output data %u - expected %u!\n", cbDataReturned, cbData));
    805                     cbDataReturned = cbData;
    806                     Status = STATUS_BUFFER_TOO_SMALL;
    807                 }
    808                 if (cbDataReturned > 0)
    809                     cbOut = cbDataReturned;
    810             }
    811             else
    812             {
    813                 if (   vrc == VERR_NOT_SUPPORTED
    814                     || vrc == VERR_INVALID_PARAMETER)
    815                     Status = STATUS_INVALID_PARAMETER;
    816                 else if (vrc == VERR_OUT_OF_RANGE)
    817                     Status = STATUS_INVALID_BUFFER_SIZE;
    818                 else
    819                     Status = STATUS_UNSUCCESSFUL;
    820             }
    821             break;
    822         }
     778    }
     779    else
     780    {
     781        LogFlowFunc(("Not buffered request (%#x) - not supported\n",
     782                     pStack->Parameters.DeviceIoControl.IoControlCode));
     783        Status = STATUS_NOT_SUPPORTED;
    823784    }
    824785
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

    r50826 r51224  
    301301*   Global Variables                                                           *
    302302*******************************************************************************/
    303 static const size_t cbChangeMemBalloonReq = RT_OFFSETOF(VMMDevChangeMemBalloon, aPhysPage[VMMDEV_MEMORY_BALLOON_CHUNK_PAGES]);
     303static const uint32_t cbChangeMemBalloonReq = RT_OFFSETOF(VMMDevChangeMemBalloon, aPhysPage[VMMDEV_MEMORY_BALLOON_CHUNK_PAGES]);
    304304
    305305#if defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
     
    427427            pReq->header.rc          = VERR_INTERNAL_ERROR;
    428428            pReq->hypervisorSize     = cbHypervisor;
    429             pReq->hypervisorStart    = (uintptr_t)RTR0MemObjAddress(hObj);
     429            pReq->hypervisorStart    = (RTGCPTR32)(uintptr_t)RTR0MemObjAddress(hObj);
    430430            if (    uAlignment == PAGE_SIZE
    431431                &&  pReq->hypervisorStart & (_4M - 1))
     
    901901{
    902902    int rc, rc2;
    903     unsigned i;
    904903
    905904#ifdef VBOX_GUESTDRV_WITH_RELEASE_LOGGER
     
    957956    RTListInit(&pDevExt->FreeList);
    958957    RTListInit(&pDevExt->SessionList);
    959 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING
    960     pDevExt->fVRDPEnabled = false;
    961 #endif
    962958    pDevExt->fLoggingEnabled = false;
    963959    pDevExt->f32PendingEvents = 0;
     
    19051901    const VMMDevRequestType enmType   = pReqHdr->requestType;
    19061902    const uint32_t          cbReq     = pReqHdr->size;
    1907     const uint32_t          cbMinSize = vmmdevGetRequestSize(enmType);
     1903    const uint32_t          cbMinSize = (uint32_t)vmmdevGetRequestSize(enmType);
    19081904
    19091905    LogFlowFunc(("Type=%d\n", pReqHdr->requestType));
     
    25082504    return rc;
    25092505}
    2510 
    2511 
    2512 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING
    2513 /**
    2514  * Enables the VRDP session and saves its session ID.
    2515  *
    2516  * @returns VBox status code.
    2517  *
    2518  * @param   pDevExt             The device extention.
    2519  * @param   pSession            The session.
    2520  */
    2521 static int VBoxGuestCommonIOCtl_EnableVRDPSession(VBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession)
    2522 {
    2523     /* Nothing to do here right now, since this only is supported on Windows at the moment. */
    2524     return VERR_NOT_IMPLEMENTED;
    2525 }
    2526 
    2527 
    2528 /**
    2529  * Disables the VRDP session.
    2530  *
    2531  * @returns VBox status code.
    2532  *
    2533  * @param   pDevExt             The device extention.
    2534  * @param   pSession            The session.
    2535  */
    2536 static int VBoxGuestCommonIOCtl_DisableVRDPSession(VBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession)
    2537 {
    2538     /* Nothing to do here right now, since this only is supported on Windows at the moment. */
    2539     return VERR_NOT_IMPLEMENTED;
    2540 }
    2541 #endif /* VBOX_WITH_VRDP_SESSION_HANDLING */
    25422506
    25432507
     
    29492913                break;
    29502914
    2951 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING
    2952             case VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION:
    2953                 rc = VBoxGuestCommonIOCtl_EnableVRDPSession(pDevExt, pSession);
    2954                 break;
    2955 
    2956             case VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION:
    2957                 rc = VBoxGuestCommonIOCtl_DisableVRDPSession(pDevExt, pSession);
    2958                 break;
    2959 #endif /* VBOX_WITH_VRDP_SESSION_HANDLING */
    29602915            case VBOXGUEST_IOCTL_SET_MOUSE_STATUS:
    29612916                CHECKRET_SIZE("SET_MOUSE_STATUS", sizeof(uint32_t));
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h

    r50688 r51224  
    162162     * #SessionSpinlock lock. */
    163163    RTLISTANCHOR                SessionList;
    164 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING
    165     bool                        fVRDPEnabled;
    166 #endif
    167164    /** Flag indicating whether logging to the release log
    168165     *  is enabled. */
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