summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2020-06-05 20:59:58 +0200
committerGravatar Nikias Bassen2020-06-05 20:59:58 +0200
commit0aea87a47e58b2c1ae7f44331ef1749700de1d64 (patch)
tree479f4132af265b5acc6aaaca27621ab0b96d8cac /tools
parent76e6449e23ee34d820271ec7f4a2f4cf84b412e9 (diff)
downloadlibideviceactivation-0aea87a47e58b2c1ae7f44331ef1749700de1d64.tar.gz
libideviceactivation-0aea87a47e58b2c1ae7f44331ef1749700de1d64.tar.bz2
Unify --network option with the other idevice tools
Diffstat (limited to 'tools')
-rw-r--r--tools/ideviceactivation.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/ideviceactivation.c b/tools/ideviceactivation.c
index bc660d5..1df73ff 100644
--- a/tools/ideviceactivation.c
+++ b/tools/ideviceactivation.c
@@ -64,7 +64,7 @@ static void print_usage(int argc, char **argv)
printf("The following OPTIONS are accepted:\n");
printf(" -d, --debug\t\tenable communication debugging\n");
printf(" -u, --udid UDID\ttarget specific device by UDID\n");
- printf(" -n, --network\t\tconnect to network device even if available via USB\n");
+ printf(" -n, --network\t\tconnect to network device\n");
printf(" -b, --batch\t\texplicitly run in non-interactive mode (default: auto-detect)\n");
printf(" -s, --service URL\tuse activation webservice at URL instead of default\n");
printf(" -v, --version\t\tprint version information and exit\n");
@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
int i;
int interactive = 1;
int result = EXIT_FAILURE;
- enum idevice_options lookup_opts = IDEVICE_LOOKUP_USBMUX | IDEVICE_LOOKUP_NETWORK;
+ int use_network = 0;
typedef enum {
OP_NONE = 0, OP_ACTIVATE, OP_DEACTIVATE, OP_GETSTATE
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
continue;
}
else if (!strcmp(argv[i], "-n") || !strcmp(argv[i], "--network")) {
- lookup_opts |= IDEVICE_LOOKUP_PREFER_NETWORK;
+ use_network = 1;
continue;
}
else if (!strcmp(argv[i], "-s") || !strcmp(argv[i], "--service")) {
@@ -219,7 +219,7 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
- ret = idevice_new_with_options(&device, udid, lookup_opts);
+ ret = idevice_new_with_options(&device, udid, (use_network) ? IDEVICE_LOOKUP_NETWORK : IDEVICE_LOOKUP_USBMUX);
if (ret != IDEVICE_E_SUCCESS) {
if (udid) {
printf("ERROR: Device %s not found!\n", udid);