libimobiledevice/libimobiledevice-1.1.1-iOS_5.patch

28 lines
886 B
Diff
Raw Permalink Normal View History

--- libimobiledevice-1.1.1/src/lockdown.c.orig 2012-01-29 23:32:56.000000000 +0100
+++ libimobiledevice-1.1.1/src/lockdown.c 2012-01-29 23:33:41.000000000 +0100
@@ -86,7 +86,23 @@
plist_t result_node = plist_dict_get_item(dict, "Result");
if (!result_node) {
- return ret;
+ /* iOS 5: the 'Result' key is not present anymore.
+ But we need to check for the 'Error' key. */
+ plist_t err_node = plist_dict_get_item(dict, "Error");
+ if (err_node) {
+ if (plist_get_node_type(err_node) == PLIST_STRING) {
+ char *err_value = NULL;
+ plist_get_string_val(err_node, &err_value);
+ if (err_value) {
+ debug_info("ERROR: %s", err_value);
+ free(err_value);
+ } else {
+ debug_info("ERROR: unknown error occured");
+ }
+ }
+ return RESULT_FAILURE;
+ }
+ return RESULT_SUCCESS;
}
plist_type result_type = plist_get_node_type(result_node);