diff options
author | 2025-07-15 18:17:06 +0200 | |
---|---|---|
committer | 2025-07-15 18:17:48 +0200 | |
commit | c269d7e3a7c28ac33d05d5c3de6a8682f480abd0 (patch) | |
tree | 46f1b5ac3d73d414dcf44690dd8905c28007d1b5 /tools | |
parent | efcbdb6a46df50dafd47d1a4ff42019b044a1ca8 (diff) | |
download | libimobiledevice-c269d7e3a7c28ac33d05d5c3de6a8682f480abd0.tar.gz libimobiledevice-c269d7e3a7c28ac33d05d5c3de6a8682f480abd0.tar.bz2 |
idevicesyslog: Fix initial device enumeration
Diffstat (limited to 'tools')
-rw-r--r-- | tools/idevicesyslog.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/idevicesyslog.c b/tools/idevicesyslog.c index c8f4613..5b124b5 100644 --- a/tools/idevicesyslog.c +++ b/tools/idevicesyslog.c @@ -1233,8 +1233,16 @@ int main(int argc, char *argv[]) int num = 0; idevice_info_t *devices = NULL; idevice_get_device_list_extended(&devices, &num); + int count = 0; + for (int i = 0; i < num; i++) { + if (devices[i]->conn_type == CONNECTION_NETWORK && use_network) { + count++; + } else if (devices[i]->conn_type == CONNECTION_USBMUXD) { + count++; + } + } idevice_device_list_extended_free(devices); - if (num == 0) { + if (count == 0) { if (!udid) { fprintf(stderr, "No device found. Plug in a device or pass UDID with -u to wait for device to be available.\n"); return 1; |