From bd061e8ce015d493fcec059c90a4aff752b63e10 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 5 Apr 2022 01:19:57 +0200 Subject: ideviceactivation: Bail out if drmHandshake request fails --- tools/ideviceactivation.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools') 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); -- cgit v1.1-32-gdbae