summaryrefslogtreecommitdiffstats
path: root/src/limera1n.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-11-07 22:11:57 +0100
committerGravatar Martin Szulecki2012-11-07 22:11:57 +0100
commit3bd16a8b8b79cd9af20260cdbd5d3ac7ee3dbd8b (patch)
tree124ea4690334903f57007fbf5efafd0730b320fb /src/limera1n.c
parentb65a7ce7ebca6730fce5dcbfd820d8ef4124e18f (diff)
downloadidevicerestore-3bd16a8b8b79cd9af20260cdbd5d3ac7ee3dbd8b.tar.gz
idevicerestore-3bd16a8b8b79cd9af20260cdbd5d3ac7ee3dbd8b.tar.bz2
change info(), error(), and debug() into functions and allow redirecting the output
Diffstat (limited to 'src/limera1n.c')
-rw-r--r--src/limera1n.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/limera1n.c b/src/limera1n.c
index c4b11f9..0d0edcc 100644
--- a/src/limera1n.c
+++ b/src/limera1n.c
@@ -30,7 +30,7 @@
int limera1n_exploit(struct irecv_device *device, irecv_client_t client)
{
- irecv_error_t error = IRECV_E_SUCCESS;
+ irecv_error_t err = IRECV_E_SUCCESS;
unsigned int i = 0;
unsigned char buf[0x800];
unsigned char shellcode[0x800];
@@ -57,9 +57,9 @@ int limera1n_exploit(struct irecv_device *device, irecv_client_t client)
memcpy(shellcode, limera1n_payload, sizeof(limera1n_payload));
debug("Resetting device counters\n");
- error = irecv_reset_counters(client);
- if (error != IRECV_E_SUCCESS) {
- error("%s\n", irecv_strerror(error));
+ err = irecv_reset_counters(client);
+ if (err != IRECV_E_SUCCESS) {
+ error("%s\n", irecv_strerror(err));
return -1;
}
@@ -98,7 +98,6 @@ int limera1n_exploit(struct irecv_device *device, irecv_client_t client)
debug("Reconnecting to device\n");
client = irecv_reconnect(client, 7);
if (client == NULL) {
- debug("%s\n", irecv_strerror(error));
error("Unable to reconnect\n");
return -1;
}