summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r--src/idevicerestore.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 825e24c..e2a9f03 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -493,20 +493,20 @@ int idevicerestore_start(struct idevicerestore_client_t* client)
load_version_data(client);
// Download WTF IPSW
- char* s_wtfurl = NULL;
+ const char* s_wtfurl = NULL;
plist_t wtfurl = plist_access_path(client->version_data, 7, "MobileDeviceSoftwareVersionsByVersion", "5", "RecoverySoftwareVersions", "WTF", "304218112", "5", "FirmwareURL");
- if (wtfurl && (plist_get_node_type(wtfurl) == PLIST_STRING)) {
- plist_get_string_val(wtfurl, &s_wtfurl);
+ if (PLIST_IS_STRING(wtfurl)) {
+ s_wtfurl = plist_get_string_ptr(wtfurl, NULL);
}
if (!s_wtfurl) {
logger(LL_INFO, "Using hardcoded x12220000_5_Recovery.ipsw URL\n");
- s_wtfurl = strdup("http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6618.20090617.Xse7Y/x12220000_5_Recovery.ipsw");
+ s_wtfurl = "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6618.20090617.Xse7Y/x12220000_5_Recovery.ipsw";
}
// make a local file name
- char* fnpart = strrchr(s_wtfurl, '/');
+ const char* fnpart = strrchr(s_wtfurl, '/');
if (!fnpart) {
- fnpart = (char*)"x12220000_5_Recovery.ipsw";
+ fnpart = "x12220000_5_Recovery.ipsw";
} else {
fnpart++;
}