diff options
author | Martin Szulecki | 2010-01-29 02:17:40 +0100 |
---|---|---|
committer | Martin Szulecki | 2010-01-29 02:17:40 +0100 |
commit | 20671cb0ad7ba9c1f1f70d5fbdb271e4f30526fc (patch) | |
tree | b22017e833e5c74d2655c538055ccb5f3536c443 /src/lockdown.c | |
parent | 96101a1231a4ddfeb40fd738a24e108a3a904048 (diff) | |
download | libimobiledevice-20671cb0ad7ba9c1f1f70d5fbdb271e4f30526fc.tar.gz libimobiledevice-20671cb0ad7ba9c1f1f70d5fbdb271e4f30526fc.tar.bz2 |
Add LOCKDOWN_E_INVALID_ACTIVATION_RECORD if activation errors out
Diffstat (limited to 'src/lockdown.c')
-rw-r--r-- | src/lockdown.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index 13f3d48..512ec9e 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -1337,7 +1337,19 @@ lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activati if (lockdown_check_result(dict, "Activate") == RESULT_SUCCESS) { debug_info("success"); ret = LOCKDOWN_E_SUCCESS; + + } else { + plist_t error_node = plist_dict_get_item(dict, "Error"); + if (error_node && PLIST_STRING == plist_get_node_type(error_node)) { + char *error = NULL; + plist_get_string_val(error_node, &error); + if (!strcmp(error, "InvalidActivationRecord")) { + ret = LOCKDOWN_E_INVALID_ACTIVATION_RECORD; + } + free(error); + } } + plist_free(dict); dict = NULL; |