summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.c
diff options
context:
space:
mode:
authorGravatar Joshua Hill2010-06-07 14:24:08 +0800
committerGravatar rcg4u2010-06-09 17:17:29 +0800
commita274554b753880dd7042b6013d0158a0b81124c7 (patch)
treeb114cc3ab2369805ece1c169684a7f95ffdf7d3b /src/idevicerestore.c
parent9279f889d7e296880fd7ea9d6c7cec499db62ea4 (diff)
downloadidevicerestore-a274554b753880dd7042b6013d0158a0b81124c7.tar.gz
idevicerestore-a274554b753880dd7042b6013d0158a0b81124c7.tar.bz2
I really need to put more descriptive messages here, but im doing stuff all over the place
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r--src/idevicerestore.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 0e77447..a1faeac 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -137,11 +137,12 @@ int main(int argc, char* argv[]) {
}
// discover the device type
- idevicerestore_device = check_device(uuid);
- if (idevicerestore_device < 0) {
+ int id = check_device(uuid);
+ if (id < 0) {
error("ERROR: Unable to discover device type\n");
return -1;
}
+ idevicerestore_device = &idevicerestore_devices[id];
// extract buildmanifest
plist_t buildmanifest = NULL;
@@ -178,7 +179,7 @@ int main(int argc, char* argv[]) {
// devices that come after iPod2g require personalized firmwares
plist_t tss_request = NULL;
plist_t tss = NULL;
- if (idevicerestore_device > DEVICE_IPOD2G) {
+ if (idevicerestore_device->device_id > DEVICE_IPOD2G) {
info("Creating TSS request\n");
// fetch the device's ECID for the TSS request
if (get_ecid(uuid, &ecid) < 0 || ecid == 0) {