Pass all required info to newEndpoint.
This commit is contained in:
@@ -78,10 +78,12 @@ func (e *endpoint) transfer(buf []byte, timeout time.Duration) (int, error) {
|
|||||||
return n, nil
|
return n, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func newEndpoint(d *Device) *endpoint {
|
func newEndpoint(d *Device, s InterfaceSetup, e EndpointInfo) *endpoint {
|
||||||
return &endpoint{
|
return &endpoint{
|
||||||
h: d.handle,
|
InterfaceSetup: s,
|
||||||
readTimeout: d.ReadTimeout,
|
EndpointInfo: e,
|
||||||
writeTimeout: d.WriteTimeout,
|
h: d.handle,
|
||||||
|
readTimeout: d.ReadTimeout,
|
||||||
|
writeTimeout: d.WriteTimeout,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user