diff options
Diffstat (limited to 'dev/housearresttest.c')
| -rw-r--r-- | dev/housearresttest.c | 11 |
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) | |||
| 96 | goto leave_cleanup; | 96 | goto leave_cleanup; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | uint16_t port = 0; | 99 | lockdownd_service_descriptor_t service = NULL; |
| 100 | if (lockdownd_start_service(client, "com.apple.mobile.house_arrest", &port) != LOCKDOWN_E_SUCCESS) { | 100 | if (lockdownd_start_service(client, "com.apple.mobile.house_arrest", &service) != LOCKDOWN_E_SUCCESS) { |
| 101 | printf("could not start house_arrest service!\n"); | 101 | printf("could not start house_arrest service!\n"); |
| 102 | goto leave_cleanup; | 102 | goto leave_cleanup; |
| 103 | } | 103 | } |
| @@ -107,11 +107,16 @@ int main(int argc, char **argv) | |||
| 107 | client = NULL; | 107 | client = NULL; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | if (house_arrest_client_new(dev, port, &hac) != HOUSE_ARREST_E_SUCCESS) { | 110 | if (house_arrest_client_new(dev, service, &hac) != HOUSE_ARREST_E_SUCCESS) { |
| 111 | printf("could not connect to house_arrest service!\n"); | 111 | printf("could not connect to house_arrest service!\n"); |
| 112 | goto leave_cleanup; | 112 | goto leave_cleanup; |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | if (service) { | ||
| 116 | lockdownd_service_descriptor_free(service); | ||
| 117 | service = NULL; | ||
| 118 | } | ||
| 119 | |||
| 115 | res = house_arrest_send_command(hac, "VendDocuments", appid); | 120 | res = house_arrest_send_command(hac, "VendDocuments", appid); |
| 116 | if (res != HOUSE_ARREST_E_SUCCESS) { | 121 | if (res != HOUSE_ARREST_E_SUCCESS) { |
| 117 | printf("error %d when trying to get VendDocuments\n", res); | 122 | printf("error %d when trying to get VendDocuments\n", res); |
