Skip to content

Commit

Permalink
iproxy: Also disconnect client if usbmuxd is not running or no device…
Browse files Browse the repository at this point in the history
… is found
  • Loading branch information
nikias committed Sep 25, 2014
1 parent ca68e3c commit 84fc937
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/iproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ static void *acceptor_thread(void *arg)
if ((count = usbmuxd_get_device_list(&dev_list)) < 0) {
printf("Connecting to usbmuxd failed, terminating.\n");
free(dev_list);
if (cdata->fd > 0) {
close(cdata->fd);
}
return NULL;
}

Expand All @@ -184,6 +187,9 @@ static void *acceptor_thread(void *arg)
if (dev_list == NULL || dev_list[0].handle == 0) {
printf("No connected device found, terminating.\n");
free(dev_list);
if (cdata->fd > 0) {
close(cdata->fd);
}
return NULL;
}

Expand Down

0 comments on commit 84fc937

Please sign in to comment.