common: Use the first instead of last matching set of bulk endpoints

Apparently the Mitsu K60/Kodak 305 enumerate differently on Linux vs
Windows -- With the latter, there's only two endpoints, but on Linux,
there's an additional OUT endpoint which works for everything except
image bulk transfers.
This commit is contained in:
Solomon Peachy 2016-09-01 02:56:49 -04:00
parent ca1c8ee5ba
commit 4a8e5dbd4e
1 changed files with 5 additions and 1 deletions

View File

@ -27,7 +27,7 @@
#include "backend_common.h"
#define BACKEND_VERSION "0.66"
#define BACKEND_VERSION "0.67"
#ifndef URI_PREFIX
#error "Must Define URI_PREFIX"
#endif
@ -478,6 +478,8 @@ static int print_scan_output(struct libusb_device *device,
else
endp_down = config->interface[0].altsetting[0].endpoint[i].bEndpointAddress;
}
if (endp_up && endp_down)
break;
}
buf[0] = 0;
@ -924,6 +926,8 @@ int main (int argc, char **argv)
else
endp_down = config->interface[0].altsetting[0].endpoint[i].bEndpointAddress;
}
if (endp_up && endp_down)
break;
}
if (config)