#28 ✓resolved
Martin S.

[PATCH] Make usb bus enumeration work reliably

Reported by Martin S. | April 14th, 2009 @ 12:34 PM | in 1.0 Release

Attached patch fixes the way how the usb busses/devices are enumerated by libusb. It changes it to use the dirname/filename string members instead of the numeric location/devnum members.

It appears the numerical members change among consecutive calls and are not reliable. When testing it even reported all bus->location members to be 0 for ALL devices and busses which of course leads to problems when using iphone_get_specific_device().

Looking at other projects sources reveals that the only reliable way is to parse the dirname/filename strings and use them to determine a bus/device combination.

All this ofc. unless I have overlooked some other "sync-kind" of call for libusb, but judging from the other sources this is the way it is supposed to be done.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A project around supporting the iPhone in Linux.

See http://libimobiledevice.org

People watching this ticket


Referenced by