Submitted by Stephen Roe:

patch #7710: usb_libusb: Check VID/PID before opening device
* usb_libusb.c (usbdev_open): Swap the sequence of verifying the
VID:PID, and opening the device.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1228 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2013-09-13 19:56:07 +00:00
parent df18e6c882
commit dc1bacb7cb
3 changed files with 23 additions and 11 deletions

View File

@ -1,3 +1,10 @@
2013-09-13 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
Submitted by Stephen Roe:
patch #7710: usb_libusb: Check VID/PID before opening device
* usb_libusb.c (usbdev_open): Swap the sequence of verifying the
VID:PID, and opening the device.
2013-09-13 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
patch #8176: butterfly.c (AVR109 protocol implementation) clean-up and bug-fixing

9
NEWS
View File

@ -107,10 +107,11 @@ Current:
- bug #28344: chip_erase_delay too short for ATmega324P, 644, 644P, and 1284P
- bug #34277: avrdude reads wrong byte order if using avr911 (aka butterfly)
- bug #35456: The progress bar for STK500V2 programmer is "wrong".
- patch #5708 avrdude should make 10 synchronization attempts instead of just one
- patch #7606 ATtiny43u support
- patch #7657 Add ATmega406 support for avrdude using DRAGON + JTAG
- bug #35474 Feature request: print fuse values in safemode output.
- patch #5708: avrdude should make 10 synchronization attempts instead of just one
- patch #7606: ATtiny43u support
- patch #7657: Add ATmega406 support for avrdude using DRAGON + JTAG
- bug #35474: Feature request: print fuse values in safemode output.
- patch #7710: usb_libusb: Check VID/PID before opening device
* Keep track of input file contents

View File

@ -114,12 +114,12 @@ static int usbdev_open(char * port, long baud, union filedescriptor *fd)
for (bus = usb_get_busses(); bus; bus = bus->next)
{
for (dev = bus->devices; dev; dev = dev->next)
{
udev = usb_open(dev);
if (udev)
{
if (dev->descriptor.idVendor == USB_VENDOR_ATMEL &&
dev->descriptor.idProduct == (unsigned short)baud)
{
udev = usb_open(dev);
if (udev)
{
/* yeah, we found something */
if (usb_get_string_simple(udev,
@ -247,10 +247,14 @@ static int usbdev_open(char * port, long baud, union filedescriptor *fd)
}
}
return 0;
}
trynext:
usb_close(udev);
}
else
fprintf(stderr,
"%s: usbdev_open(): cannot open device: %s\n",
progname, usb_strerror());
}
}
}