VirtualBox

Changeset 53168 in vbox


Ignore:
Timestamp:
Oct 31, 2014 11:42:33 AM (10 years ago)
Author:
vboxsync
Message:

VUSBSniffer: Don't include the setup URB data twice in the packet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/VUSBSniffer.cpp

    r53163 r53168  
    598598    uint32_t cbCapturedLength = sizeof(UsbHdr);
    599599    uint32_t cIsocPkts = 0;
     600    uint8_t *pbData = NULL;
    600601
    601602    RTTimeNow(&TimeNow);
     
    628629    }
    629630    cbDataLength = cbUrbLength;
     631    pbData = &pUrb->abData[0];
    630632
    631633    switch (pUrb->enmType)
     
    673675            cbDataLength = 0;
    674676    }
     677    else if (pUrb->enmDir == VUSBDIRECTION_SETUP)
     678        cbDataLength -= sizeof(VUSBSETUP);
    675679
    676680    Epb.u32CapturedLen = cbCapturedLength + cbDataLength;
     
    727731        if (   RT_SUCCESS(rc)
    728732            && cbDataLength)
    729             rc = vusbSnifferBlockAddData(pThis, pUrb->abData, pUrb->cbData);
     733            rc = vusbSnifferBlockAddData(pThis, pbData, cbDataLength);
    730734
    731735        if (RT_SUCCESS(rc))
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