added login and permission fix

This commit is contained in:
2026-02-18 23:59:16 +01:00
parent 6172d9e2aa
commit 3579924883
5 changed files with 60 additions and 35 deletions
+7
View File
@@ -421,10 +421,15 @@ func (s *Server) handleCmdSubmit(r io.Reader, hdr *URBHeader, retChan chan<- []b
5000, buf,
)
if err != nil {
log.Printf("[usbip-server] CTRL OUT seq=%d failed: %v", hdr.SeqNum, err)
status = -32 // -EPIPE
} else {
log.Printf("[usbip-server] CTRL OUT seq=%d OK (bmReqType=0x%02x bReq=0x%02x wVal=0x%04x)",
hdr.SeqNum, bmRequestType, bRequest, wValue)
}
}
log.Printf("[usbip-server] CTRL OUT seq=%d → response status=%d", hdr.SeqNum, status)
resp, err := BuildRetSubmit(hdr.SeqNum, hdr.DevID, hdr.Direction, hdr.Endpoint, status, nil)
if err != nil {
return err
@@ -559,6 +564,8 @@ func (s *Server) handleCmdUnlink(r io.Reader, hdr *URBHeader, retChan chan<- []b
return err
}
log.Printf("[usbip-server] UNLINK seq=%d target_seq=%d", hdr.SeqNum, body.UnlinkSeqNum)
s.mu.Lock()
pending, exists := s.pendingURBs[body.UnlinkSeqNum]
if exists {