summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--iproxy.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/iproxy.c b/iproxy.c
index 199c51e..56e30ed 100644
--- a/iproxy.c
+++ b/iproxy.c
@@ -143,6 +143,7 @@ void *acceptor_thread(void *arg)
struct client_data *cdata;
usbmuxd_scan_result *dev_list = NULL;
pthread_t ctos;
+ int count;
if (!arg) {
fprintf(stderr, "invalid client_data provided!\n");
@@ -151,19 +152,21 @@ void *acceptor_thread(void *arg)
cdata = (struct client_data*)arg;
- if (usbmuxd_scan(&dev_list) < 0) {
+ if ((count = usbmuxd_scan(&dev_list)) < 0) {
printf("Connecting to usbmuxd failed, terminating.\n");
free(dev_list);
return NULL;
}
+ fprintf(stdout, "Number of available devices == %d\n", count);
+
if (dev_list == NULL || dev_list[0].handle == 0) {
printf("No connected device found, terminating.\n");
free(dev_list);
return NULL;
}
- fprintf(stdout, "Requesting connecion to device handle == %d, port %d\n", dev_list[0].handle, device_port);
+ fprintf(stdout, "Requesting connecion to device handle == %d (serial: %s), port %d\n", dev_list[0].handle, dev_list[0].serial_number, device_port);
cdata->sfd = usbmuxd_connect(dev_list[0].handle, device_port);
free(dev_list);