summaryrefslogtreecommitdiffstats
path: root/dev/housearresttest.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-02-26 03:20:56 +0100
committerGravatar Martin Szulecki2013-02-26 03:20:56 +0100
commitfcc1bb855efb6860417ed827d3b50feba24a9a8b (patch)
tree47d3c7d6a985dc647f7962329014c8116d657cc9 /dev/housearresttest.c
parent3b54aac30447bc02fafd721a63a752968628e7e0 (diff)
downloadlibimobiledevice-fcc1bb855efb6860417ed827d3b50feba24a9a8b.tar.gz
libimobiledevice-fcc1bb855efb6860417ed827d3b50feba24a9a8b.tar.bz2
Refactor port number use into service descriptor to enable SSL for services
This is a major change which breaks API but is required in order to support SSL communication for services as used by network connections.
Diffstat (limited to 'dev/housearresttest.c')
-rw-r--r--dev/housearresttest.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/dev/housearresttest.c b/dev/housearresttest.c
index 951ebe4..2e24670 100644
--- a/dev/housearresttest.c
+++ b/dev/housearresttest.c
@@ -96,8 +96,8 @@ int main(int argc, char **argv)
goto leave_cleanup;
}
- uint16_t port = 0;
- if (lockdownd_start_service(client, "com.apple.mobile.house_arrest", &port) != LOCKDOWN_E_SUCCESS) {
+ lockdownd_service_descriptor_t service = NULL;
+ if (lockdownd_start_service(client, "com.apple.mobile.house_arrest", &service) != LOCKDOWN_E_SUCCESS) {
printf("could not start house_arrest service!\n");
goto leave_cleanup;
}
@@ -107,11 +107,16 @@ int main(int argc, char **argv)
client = NULL;
}
- if (house_arrest_client_new(dev, port, &hac) != HOUSE_ARREST_E_SUCCESS) {
+ if (house_arrest_client_new(dev, service, &hac) != HOUSE_ARREST_E_SUCCESS) {
printf("could not connect to house_arrest service!\n");
goto leave_cleanup;
}
+ if (service) {
+ lockdownd_service_descriptor_free(service);
+ service = NULL;
+ }
+
res = house_arrest_send_command(hac, "VendDocuments", appid);
if (res != HOUSE_ARREST_E_SUCCESS) {
printf("error %d when trying to get VendDocuments\n", res);