added a little more error logging

This commit is contained in:
tihmstar 2017-06-18 11:55:13 +02:00
parent b3f684d61b
commit d1e5c41aff

View file

@ -493,11 +493,16 @@ void get_custom_component(struct idevicerestore_client_t* client, plist_t build_
#ifndef HAVE_LIBIPATCHER #ifndef HAVE_LIBIPATCHER
reterror(-404, "compiled without libipatcher"); reterror(-404, "compiled without libipatcher");
#else #else
try {
auto comp = getIPSWComponent(client, build_identity, component); auto comp = getIPSWComponent(client, build_identity, component);
comp = move(libipatcher::decryptFile3((char*)comp.first, comp.second, libipatcher::getFirmwareKey(client->device->product_type, client->build, component))); comp = move(libipatcher::decryptFile3((char*)comp.first, comp.second, libipatcher::getFirmwareKey(client->device->product_type, client->build, component)));
*data = (unsigned char*)(char*)comp.first; *data = (unsigned char*)(char*)comp.first;
*size = comp.second; *size = comp.second;
comp.first = NULL; //don't free on destruction comp.first = NULL; //don't free on destruction
} catch (libipatcher::exception &e) {
reterror(e.code(),"ERROR: libipatcher failed with reason %s\n",e.what());
}
#endif #endif
} }