diff options
Diffstat (limited to 'src/iphone.c')
| -rw-r--r-- | src/iphone.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/iphone.c b/src/iphone.c index 5076b48..3c3034e 100644 --- a/src/iphone.c +++ b/src/iphone.c | |||
| @@ -121,9 +121,9 @@ iphone_error_t iphone_get_specific_device(unsigned int bus_n, int dev_n, iphone_ | |||
| 121 | 121 | ||
| 122 | // Set the device configuration | 122 | // Set the device configuration |
| 123 | for (bus = busses; bus; bus = bus->next) | 123 | for (bus = busses; bus; bus = bus->next) |
| 124 | if (bus->location == bus_n) | 124 | if (strtoul(bus->dirname, NULL, 10) == bus_n) |
| 125 | for (dev = bus->devices; dev != NULL; dev = dev->next) | 125 | for (dev = bus->devices; dev != NULL; dev = dev->next) |
| 126 | if (dev->devnum == dev_n) { | 126 | if (strtol(dev->filename, NULL, 10) == dev_n) { |
| 127 | phone->__device = dev; | 127 | phone->__device = dev; |
| 128 | phone->device = usb_open(phone->__device); | 128 | phone->device = usb_open(phone->__device); |
| 129 | iphone_config_usb_device(phone); | 129 | iphone_config_usb_device(phone); |
| @@ -210,7 +210,7 @@ iphone_error_t iphone_get_device(iphone_device_t * device) | |||
| 210 | for (dev = bus->devices; dev != NULL; dev = dev->next) | 210 | for (dev = bus->devices; dev != NULL; dev = dev->next) |
| 211 | if (dev->descriptor.idVendor == 0x05ac | 211 | if (dev->descriptor.idVendor == 0x05ac |
| 212 | && dev->descriptor.idProduct >= 0x1290 && dev->descriptor.idProduct <= 0x1293) | 212 | && dev->descriptor.idProduct >= 0x1290 && dev->descriptor.idProduct <= 0x1293) |
| 213 | return iphone_get_specific_device(bus->location, dev->devnum, device); | 213 | return iphone_get_specific_device(strtoul(bus->dirname, NULL, 10), strtol(dev->filename, NULL, 10), device); |
| 214 | 214 | ||
| 215 | return IPHONE_E_NO_DEVICE; | 215 | return IPHONE_E_NO_DEVICE; |
| 216 | } | 216 | } |
