VirtualBox

Changeset 85279 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Jul 12, 2020 2:26:32 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139256
Message:

Main/USBProxyBackendUsbIp.cpp: The 'unused' u32Status fields are actually signed and should be called i32Status. bugref:9790

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/generic/USBProxyBackendUsbIp.cpp

    r82968 r85279  
    123123    uint16_t     u16Cmd;
    124124    /** Status field, unused. */
    125     int32_t      u32Status;
     125    int32_t      i32Status;
    126126} UsbIpReqDevList;
    127127/** Pointer to a device list request. */
     
    144144    uint16_t     u16Cmd;
    145145    /** Status field, unused. */
    146     int32_t      u32Status;
     146    int32_t      i32Status;
    147147    /** Number of exported devices. */
    148148    uint32_t     u32DevicesExported;
     
    782782        ReqDevList.u16Version = RT_H2N_U16(USBIP_VERSION);
    783783        ReqDevList.u16Cmd     = RT_H2N_U16(USBIP_INDICATOR_REQ | USBIP_REQ_RET_DEVLIST);
    784         ReqDevList.u32Status  = RT_H2N_U32(0);
     784        ReqDevList.i32Status  = RT_H2N_S32(0);
     785
    785786        rc = RTTcpWrite(m->hSocket, &ReqDevList, sizeof(ReqDevList));
    786787        if (RT_SUCCESS(rc))
     
    895896            if (   RT_N2H_U16(m->Scratch.RetDevList.u16Version) == USBIP_VERSION
    896897                && RT_N2H_U16(m->Scratch.RetDevList.u16Cmd) == USBIP_REQ_RET_DEVLIST
    897                 && RT_N2H_U32(m->Scratch.RetDevList.u32Status) == USBIP_STATUS_SUCCESS)
     898                && RT_N2H_S32(m->Scratch.RetDevList.i32Status) == USBIP_STATUS_SUCCESS)
     899
    898900            {
    899901                /* Populate the number of exported devices in the list and go to the next state. */
     
    908910                LogRelMax(10, ("USB/IP: Host sent an invalid reply to the list exported device request (Version: %#x Cmd: %#x Status: %#x)\n",
    909911                               RT_N2H_U16(m->Scratch.RetDevList.u16Version), RT_N2H_U16(m->Scratch.RetDevList.u16Cmd),
    910                                RT_N2H_U32(m->Scratch.RetDevList.u32Status)));
     912                               RT_N2H_S32(m->Scratch.RetDevList.i32Status)));
    911913                /* Disconnect and start over. */
    912914                advanceState(kUsbIpRecvState_None);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette