[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
-
Paul Sladen April 15th, 2009 @ 10:43 AM
- Milestone set to 1.0 Release
-
Matt Colyer April 19th, 2009 @ 10:07 PM
- State changed from new to resolved
(from [ded57a40188e0c07fac91719dd6bfd8ca44c423e]) Make usb bus enumeration work reliably for iphone_get_specific_device
[#28 state:resolved]
Signed-off-by: Matt Colyer matt@colyer.name http://github.com/MattColyer/lib...
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.
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
Attachments
Referenced by
- 28 [PATCH] Make usb bus enumeration work reliably [#28 state:resolved]
- 300 segfault on ubuntu 12.10 x86_64 ~/libimobiledevice-git$ idevicedate idevicedate: /build/b...