VirtualBox

Ignore:
Timestamp:
Aug 5, 2011 10:08:31 AM (13 years ago)
Author:
vboxsync
Message:

SUPDrv: Fixed broken IDC on windows.

Location:
trunk/src/VBox/HostDrivers/Support
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r38075 r38321  
    18521852            if (pReq->Hdr.pSession != NULL)
    18531853            {
    1854                 OSDBGPRINT(("SUPDRV_IDC_REQ_CONNECT: pSession=%p expected NULL!\n", pReq->Hdr.pSession));
     1854                OSDBGPRINT(("SUPDRV_IDC_REQ_CONNECT: Hdr.pSession=%p expected NULL!\n", pReq->Hdr.pSession));
    18551855                return pReqHdr->rc = VERR_INVALID_PARAMETER;
    18561856            }
     
    18661866                OSDBGPRINT(("SUPDRV_IDC_REQ_CONNECT: uMinVersion=%#x uMaxVersion=%#x doesn't match!\n",
    18671867                            pReq->u.In.uMinVersion, pReq->u.In.uReqVersion));
     1868                return pReqHdr->rc = VERR_INVALID_PARAMETER;
     1869            }
     1870            if (pSession != NULL)
     1871            {
     1872                OSDBGPRINT(("SUPDRV_IDC_REQ_CONNECT: pSession=%p expected NULL!\n", pSession));
    18681873                return pReqHdr->rc = VERR_INVALID_PARAMETER;
    18691874            }
     
    18911896            pReq->u.Out.uDriverRevision = VBOX_SVN_REV;
    18921897
    1893             /*
    1894              * On NT we will already have a session associated with the
    1895              * client, just like with the SUP_IOCTL_COOKIE request, while
    1896              * the other doesn't.
    1897              */
    1898 #ifdef RT_OS_WINDOWS
    1899             pReq->Hdr.rc = VINF_SUCCESS;
    1900 #else
    1901             AssertReturn(!pSession, VERR_INTERNAL_ERROR);
    19021898            pReq->Hdr.rc = supdrvCreateSession(pDevExt, false /* fUser */, &pSession);
    19031899            if (RT_FAILURE(pReq->Hdr.rc))
     
    19061902                return VINF_SUCCESS;
    19071903            }
    1908 #endif
    19091904
    19101905            pReq->u.Out.pSession = pSession;
  • trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp

    r38075 r38321  
    484484    {
    485485        /* Verify the pDevExt in the session. */
    486         if (    (   !pSession
    487                  && pStack->Parameters.DeviceIoControl.IoControlCode == SUPDRV_IDC_REQ_CONNECT)
    488             ||  (   VALID_PTR(pSession)
    489                  && pSession->pDevExt == pDevExt))
     486        if (  pStack->Parameters.DeviceIoControl.IoControlCode != SUPDRV_IDC_REQ_CONNECT
     487            ? VALID_PTR(pSession) && pSession->pDevExt == pDevExt
     488            : !pSession
     489           )
    490490        {
    491491            /* Verify that the size in the request header is correct. */
     
    501501                if (!rc)
    502502                {
     503                    if (pStack->Parameters.DeviceIoControl.IoControlCode == SUPDRV_IDC_REQ_CONNECT)
     504                        pFileObj->FsContext = ((PSUPDRVIDCREQCONNECT)pHdr)->u.Out.pSession;
     505                    /** @todo Handle SUPDRV_IDC_REQ_DISCONNECT and drop the
     506                     *        windows hack in the generic code. */
     507
    503508                    rcNt = STATUS_SUCCESS;
    504509                    cbOut = pHdr->cb;
  • trunk/src/VBox/HostDrivers/Support/win/SUPR0IdcClient-win.c

    r33540 r38321  
    119119        {
    120120            pHandle->s.pDeviceObject = pDeviceObject;
    121             pHandle->s.pFileObject = pFileObject;
     121            pHandle->s.pFileObject   = pFileObject;
    122122            return rc;
    123123        }
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