diff options
| author | 2010-01-29 02:17:40 +0100 | |
|---|---|---|
| committer | 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 | |||
| 1337 | if (lockdown_check_result(dict, "Activate") == RESULT_SUCCESS) { | 1337 | if (lockdown_check_result(dict, "Activate") == RESULT_SUCCESS) { |
| 1338 | debug_info("success"); | 1338 | debug_info("success"); |
| 1339 | ret = LOCKDOWN_E_SUCCESS; | 1339 | ret = LOCKDOWN_E_SUCCESS; |
| 1340 | |||
| 1341 | } else { | ||
| 1342 | plist_t error_node = plist_dict_get_item(dict, "Error"); | ||
| 1343 | if (error_node && PLIST_STRING == plist_get_node_type(error_node)) { | ||
| 1344 | char *error = NULL; | ||
| 1345 | plist_get_string_val(error_node, &error); | ||
| 1346 | if (!strcmp(error, "InvalidActivationRecord")) { | ||
| 1347 | ret = LOCKDOWN_E_INVALID_ACTIVATION_RECORD; | ||
| 1348 | } | ||
| 1349 | free(error); | ||
| 1350 | } | ||
| 1340 | } | 1351 | } |
| 1352 | |||
| 1341 | plist_free(dict); | 1353 | plist_free(dict); |
| 1342 | dict = NULL; | 1354 | dict = NULL; |
| 1343 | 1355 | ||
