summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2022-04-05 01:19:57 +0200
committerGravatar Nikias Bassen2022-04-05 01:19:57 +0200
commitbd061e8ce015d493fcec059c90a4aff752b63e10 (patch)
treebcee0b11d214806a44ff8d2f97fa97d7789ba8c1 /tools
parente362173c72fc2a221a3e67cc4031fbaeb2e99613 (diff)
downloadlibideviceactivation-bd061e8ce015d493fcec059c90a4aff752b63e10.tar.gz
libideviceactivation-bd061e8ce015d493fcec059c90a4aff752b63e10.tar.bz2
ideviceactivation: Bail out if drmHandshake request fails
Diffstat (limited to 'tools')
-rw-r--r--tools/ideviceactivation.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/ideviceactivation.c b/tools/ideviceactivation.c
index 1df73ff..33e6be7 100644
--- a/tools/ideviceactivation.c
+++ b/tools/ideviceactivation.c
@@ -336,7 +336,11 @@ int main(int argc, char *argv[])
plist_free(blob);
/* send request to server and get response */
- idevice_activation_send_request(request, &response);
+ if (idevice_activation_send_request(request, &response) != IDEVICE_ACTIVATION_E_SUCCESS) {
+ fprintf(stderr, "Failed to get drmHandshake result from activation server.\n");
+ result = EXIT_FAILURE;
+ goto cleanup;
+ }
plist_t handshake_response = NULL;
idevice_activation_response_get_fields(response, &handshake_response);
idevice_activation_response_free(response);