In usbdev_recv_frame(), fix a bug where a new recv request was issued

even though all desired data had aldready been received.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1277 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2014-02-22 20:30:16 +00:00
parent f80f51f6a9
commit 7f2079731b
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2014-02-22 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* usb_libusb.c (usbdev_recv_frame): Fix a bug where a new recv
request was issued even though all desired data had aldready
been received.
2014-02-21 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* serial.h: Change the second parameter of the ser_open method

View File

@ -460,7 +460,7 @@ static int usbdev_recv_frame(union filedescriptor *fd, unsigned char *buf, size_
n += rv;
nbytes -= rv;
}
while (rv == fd->usb.max_xfer);
while (nbytes > 0 && rv == fd->usb.max_xfer);
if (nbytes < 0)
return -1;