diff options
-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[]) | |||
1233 | int num = 0; | 1233 | int num = 0; |
1234 | idevice_info_t *devices = NULL; | 1234 | idevice_info_t *devices = NULL; |
1235 | idevice_get_device_list_extended(&devices, &num); | 1235 | idevice_get_device_list_extended(&devices, &num); |
1236 | int count = 0; | ||
1237 | for (int i = 0; i < num; i++) { | ||
1238 | if (devices[i]->conn_type == CONNECTION_NETWORK && use_network) { | ||
1239 | count++; | ||
1240 | } else if (devices[i]->conn_type == CONNECTION_USBMUXD) { | ||
1241 | count++; | ||
1242 | } | ||
1243 | } | ||
1236 | idevice_device_list_extended_free(devices); | 1244 | idevice_device_list_extended_free(devices); |
1237 | if (num == 0) { | 1245 | if (count == 0) { |
1238 | if (!udid) { | 1246 | if (!udid) { |
1239 | fprintf(stderr, "No device found. Plug in a device or pass UDID with -u to wait for device to be available.\n"); | 1247 | fprintf(stderr, "No device found. Plug in a device or pass UDID with -u to wait for device to be available.\n"); |
1240 | return 1; | 1248 | return 1; |