PERFORCE change 172876 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Sat Jan 9 22:17:36 UTC 2010
http://p4web.freebsd.org/chv.cgi?CH=172876
Change 172876 by hselasky at hselasky_laptop001 on 2010/01/09 22:16:58
LibUSB:
- Bugfix:
- Make sure dirty variables get cleaned at transfer close.
Else it is not possible to re-open the transfer at a later
point.
- found and patched by HPS
Affected files ...
.. //depot/projects/usb/src/lib/libusb/libusb20.c#13 edit
Differences ...
==== //depot/projects/usb/src/lib/libusb/libusb20.c#13 (text+ko) ====
@@ -130,8 +130,19 @@
if (xfer->ppBuffer) {
free(xfer->ppBuffer);
}
- /* clear some fields */
+ /* reset variable fields in case the transfer is opened again */
+ xfer->priv_sc0 = 0;
+ xfer->priv_sc1 = 0;
xfer->is_opened = 0;
+ xfer->is_pending = 0;
+ xfer->is_cancel = 0;
+ xfer->is_draining = 0;
+ xfer->is_restart = 0;
+ xfer->status = 0;
+ xfer->flags = 0;
+ xfer->nFrames = 0;
+ xfer->aFrames = 0;
+ xfer->timeout = 0;
xfer->maxFrames = 0;
xfer->maxTotalLength = 0;
xfer->maxPacketLen = 0;
More information about the p4-projects
mailing list