fix USBDEVFS_SETCONFIGURATION
This commit is contained in:
parent
e327bad9c6
commit
219214c0a6
BIN
bin/usb-client
BIN
bin/usb-client
Binary file not shown.
BIN
bin/usb-relay
BIN
bin/usb-relay
Binary file not shown.
|
|
@ -381,15 +381,6 @@ func (s *Server) handleCmdSubmit(r io.Reader, hdr *URBHeader, retChan chan<- []b
|
||||||
log.Printf("[usbip-server] SET_INTERFACE(iface=%d, alt=%d) OK", wIndex, wValue)
|
log.Printf("[usbip-server] SET_INTERFACE(iface=%d, alt=%d) OK", wIndex, wValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
case bmRequestType == 0x00 && bRequest == 0x09:
|
|
||||||
// SET_CONFIGURATION (Standard, Device recipient)
|
|
||||||
if err := s.handle.SetConfiguration(uint32(wValue)); err != nil {
|
|
||||||
log.Printf("[usbip-server] SET_CONFIGURATION(%d) failed: %v", wValue, err)
|
|
||||||
status = -32
|
|
||||||
} else {
|
|
||||||
log.Printf("[usbip-server] SET_CONFIGURATION(%d) OK", wValue)
|
|
||||||
}
|
|
||||||
|
|
||||||
case bmRequestType == 0x02 && bRequest == 0x01 && wValue == 0x0000:
|
case bmRequestType == 0x02 && bRequest == 0x01 && wValue == 0x0000:
|
||||||
// CLEAR_FEATURE(ENDPOINT_HALT) (Standard, Endpoint recipient)
|
// CLEAR_FEATURE(ENDPOINT_HALT) (Standard, Endpoint recipient)
|
||||||
if err := s.handle.ClearHalt(uint32(wIndex)); err != nil {
|
if err := s.handle.ClearHalt(uint32(wIndex)); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue