summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-12-02 02:06:29 +0100
committerGravatar Nikias Bassen2013-12-02 02:06:29 +0100
commit8d4e97d4e43d854ca0cbfae7c85086fbea22928f (patch)
tree874f44e4ed539081e5d015d1739c8313152910f5
parentd102418177732716a2dc39f1dcd61be9cab92362 (diff)
downloadidevicerestore-8d4e97d4e43d854ca0cbfae7c85086fbea22928f.tar.gz
idevicerestore-8d4e97d4e43d854ca0cbfae7c85086fbea22928f.tar.bz2
tss: don't fail if BbChipID is missing for devices without baseband
-rw-r--r--src/tss.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tss.c b/src/tss.c
index 81b39fa..0b7ef75 100644
--- a/src/tss.c
+++ b/src/tss.c
@@ -140,13 +140,13 @@ int tss_parameters_add_from_manifest(plist_t parameters, plist_t build_identity)
int bb_chip_id = 0;
char* bb_chip_id_string = NULL;
node = plist_dict_get_item(build_identity, "BbChipID");
- if (!node || plist_get_node_type(node) != PLIST_STRING) {
- error("ERROR: Unable to find BbChipID node\n");
- return -1;
+ if (node && plist_get_node_type(node) == PLIST_STRING) {
+ plist_get_string_val(node, &bb_chip_id_string);
+ sscanf(bb_chip_id_string, "%x", &bb_chip_id);
+ plist_dict_insert_item(parameters, "BbChipID", plist_new_uint(bb_chip_id));
+ } else {
+ error("WARNING: Unable to find BbChipID node\n");
}
- plist_get_string_val(node, &bb_chip_id_string);
- sscanf(bb_chip_id_string, "%x", &bb_chip_id);
- plist_dict_insert_item(parameters, "BbChipID", plist_new_uint(bb_chip_id));
node = NULL;
/* BbProvisioningManifestKeyHash */