Changeset 103154 in vbox
- Timestamp:
- Jan 31, 2024 4:16:34 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/usbip/USBProxyDevice-usbip.cpp
r103153 r103154 168 168 uint16_t u16Cmd; 169 169 /** Status field, unused. */ 170 int32_t u32Status;170 int32_t i32Status; 171 171 /** Bus Id of the device as zero terminated string. */ 172 172 char aszBusId[32]; … … 191 191 uint16_t u16Cmd; 192 192 /** Status field, unused. */ 193 int32_t u32Status;193 int32_t i32Status; 194 194 } UsbIpRetImport; 195 195 /** Pointer to a import reply. */ … … 254 254 UsbIpReqRetHdr Hdr; 255 255 /** Status code. */ 256 int32_t u32Status;256 int32_t i32Status; 257 257 /** Actual length of the reply buffer. */ 258 258 uint32_t u32ActualLength; … … 298 298 UsbIpReqRetHdr Hdr; 299 299 /** Status of the request. */ 300 int32_t u32Status;300 int32_t i32Status; 301 301 /** Padding - unused. */ 302 302 uint8_t abPadding[24]; … … 505 505 { 506 506 usbProxyUsbIpReqRetHdrN2H(&pRetSubmit->Hdr); 507 pRetSubmit-> u32Status = RT_N2H_U32(pRetSubmit->u32Status);507 pRetSubmit->i32Status = RT_N2H_S32(pRetSubmit->i32Status); 508 508 pRetSubmit->u32ActualLength = RT_N2H_U32(pRetSubmit->u32ActualLength); 509 509 pRetSubmit->u32StartFrame = RT_N2H_U32(pRetSubmit->u32StartFrame); … … 557 557 { 558 558 usbProxyUsbIpReqRetHdrN2H(&pRetUnlink->Hdr); 559 pRetUnlink-> u32Status = RT_N2H_U32(pRetUnlink->u32Status);559 pRetUnlink->i32Status = RT_N2H_S32(pRetUnlink->i32Status); 560 560 } 561 561 … … 747 747 ReqImport.u16Version = RT_H2N_U16(USBIP_VERSION); 748 748 ReqImport.u16Cmd = RT_H2N_U16(USBIP_INDICATOR_REQ | USBIP_REQ_RET_IMPORT); 749 ReqImport. u32Status = RT_H2N_U32(USBIP_STATUS_SUCCESS);749 ReqImport.i32Status = RT_H2N_S32(USBIP_STATUS_SUCCESS); 750 750 rc = RTStrCopy(&ReqImport.aszBusId[0], sizeof(ReqImport.aszBusId), pProxyDevUsbIp->pszBusId); 751 751 if (rc == VINF_SUCCESS) … … 761 761 RetImport.u16Version = RT_N2H_U16(RetImport.u16Version); 762 762 RetImport.u16Cmd = RT_N2H_U16(RetImport.u16Cmd); 763 RetImport. u32Status = RT_N2H_U32(RetImport.u32Status);763 RetImport.i32Status = RT_N2H_S32(RetImport.i32Status); 764 764 if ( RetImport.u16Version == USBIP_VERSION 765 765 && RetImport.u16Cmd == USBIP_REQ_RET_IMPORT 766 && RetImport. u32Status == USBIP_STATUS_SUCCESS)766 && RetImport.i32Status == USBIP_STATUS_SUCCESS) 767 767 { 768 768 /* Read the device data. */ … … 787 787 LogRel(("UsbIp: Unexpected reply code received from host (%#x vs. %#x)\n", 788 788 RetImport.u16Cmd, USBIP_REQ_RET_IMPORT)); 789 else if (RetImport. u32Status != 0)789 else if (RetImport.i32Status != 0) 790 790 LogRel(("UsbIp: Claiming the device has failed on the host with an unspecified error\n")); 791 791 else … … 972 972 973 973 /* We still have to receive the transfer buffer, even in case of an error. */ 974 pProxyDevUsbIp->pUrbUsbIp->enmStatus = usbProxyUsbIpVUsbStatusConvertFromStatus(pProxyDevUsbIp->BufRet.RetSubmit. u32Status);974 pProxyDevUsbIp->pUrbUsbIp->enmStatus = usbProxyUsbIpVUsbStatusConvertFromStatus(pProxyDevUsbIp->BufRet.RetSubmit.i32Status); 975 975 if (pProxyDevUsbIp->pUrbUsbIp->enmDir == VUSBDIRECTION_IN) 976 976 { … … 1040 1040 usbProxyUsbIpRetUnlinkN2H(&pProxyDevUsbIp->BufRet.RetUnlink); 1041 1041 pUrbUsbIp = pProxyDevUsbIp->pUrbUsbIp; 1042 pUrbUsbIp->pVUsbUrb->enmStatus = usbProxyUsbIpVUsbStatusConvertFromStatus(pProxyDevUsbIp->BufRet.RetUnlink. u32Status);1042 pUrbUsbIp->pVUsbUrb->enmStatus = usbProxyUsbIpVUsbStatusConvertFromStatus(pProxyDevUsbIp->BufRet.RetUnlink.i32Status); 1043 1043 } 1044 1044 /* else: Probably received the data for the URB and is complete already. */
Note:
See TracChangeset
for help on using the changeset viewer.