diff options
Diffstat (limited to 'tools/ideviceprovision.c')
| -rw-r--r-- | tools/ideviceprovision.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/ideviceprovision.c b/tools/ideviceprovision.c index 1c6866d..13fd239 100644 --- a/tools/ideviceprovision.c +++ b/tools/ideviceprovision.c | |||
| @@ -193,6 +193,7 @@ static plist_t profile_get_embedded_plist(plist_t profile) | |||
| 193 | int main(int argc, char *argv[]) | 193 | int main(int argc, char *argv[]) |
| 194 | { | 194 | { |
| 195 | lockdownd_client_t client = NULL; | 195 | lockdownd_client_t client = NULL; |
| 196 | lockdownd_service_descriptor_t service = NULL; | ||
| 196 | idevice_t device = NULL; | 197 | idevice_t device = NULL; |
| 197 | idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; | 198 | idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; |
| 198 | int i; | 199 | int i; |
| @@ -278,8 +279,7 @@ int main(int argc, char *argv[]) | |||
| 278 | return -1; | 279 | return -1; |
| 279 | } | 280 | } |
| 280 | 281 | ||
| 281 | uint16_t port = 0; | 282 | if (LOCKDOWN_E_SUCCESS != lockdownd_start_service(client, "com.apple.misagent", &service)) { |
| 282 | if (LOCKDOWN_E_SUCCESS != lockdownd_start_service(client, "com.apple.misagent", &port)) { | ||
| 283 | fprintf(stderr, "Could not start service \"com.apple.misagent\"\n"); | 283 | fprintf(stderr, "Could not start service \"com.apple.misagent\"\n"); |
| 284 | lockdownd_client_free(client); | 284 | lockdownd_client_free(client); |
| 285 | idevice_free(device); | 285 | idevice_free(device); |
| @@ -289,13 +289,18 @@ int main(int argc, char *argv[]) | |||
| 289 | client = NULL; | 289 | client = NULL; |
| 290 | 290 | ||
| 291 | misagent_client_t mis = NULL; | 291 | misagent_client_t mis = NULL; |
| 292 | if (misagent_client_new(device, port, &mis) != MISAGENT_E_SUCCESS) { | 292 | if (misagent_client_new(device, service, &mis) != MISAGENT_E_SUCCESS) { |
| 293 | fprintf(stderr, "Could not connect to \"com.apple.misagent\" on device\n"); | 293 | fprintf(stderr, "Could not connect to \"com.apple.misagent\" on device\n"); |
| 294 | if (service) | ||
| 295 | lockdownd_service_descriptor_free(service); | ||
| 294 | lockdownd_client_free(client); | 296 | lockdownd_client_free(client); |
| 295 | idevice_free(device); | 297 | idevice_free(device); |
| 296 | return -1; | 298 | return -1; |
| 297 | } | 299 | } |
| 298 | 300 | ||
| 301 | if (service) | ||
| 302 | lockdownd_service_descriptor_free(service); | ||
| 303 | |||
| 299 | switch (op) { | 304 | switch (op) { |
| 300 | case OP_INSTALL: | 305 | case OP_INSTALL: |
| 301 | { | 306 | { |
