summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-07-22 00:12:16 +0200
committerGravatar Martin Szulecki2010-07-22 00:12:16 +0200
commit97c707ec3928c89c5a22ffdf06d5510f386eaf35 (patch)
tree387bd8486cfa4d687728328a562cdf00895f95e9 /src
parent689da0f6a73199b3afb7b3fbe05d03908c1276d9 (diff)
downloadlibirecovery-97c707ec3928c89c5a22ffdf06d5510f386eaf35.tar.gz
libirecovery-97c707ec3928c89c5a22ffdf06d5510f386eaf35.tar.bz2
Also report the error after file transfers
Diffstat (limited to 'src')
-rw-r--r--src/irecovery.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/irecovery.c b/src/irecovery.c
index da5812d..5a59cd0 100644
--- a/src/irecovery.c
+++ b/src/irecovery.c
@@ -48,6 +48,7 @@ void shell_usage() {
}
void parse_command(irecv_client_t client, unsigned char* command, unsigned int size) {
+ irecv_error_t error = 0;
char* cmd = strdup(command);
char* action = strtok(cmd, " ");
debug("Executing %s\n", action);
@@ -63,7 +64,8 @@ void parse_command(irecv_client_t client, unsigned char* command, unsigned int s
char* filename = strtok(NULL, " ");
debug("Uploading files %s\n", filename);
if (filename != NULL) {
- irecv_send_file(client, filename);
+ error = irecv_send_file(client, filename);
+ debug("%s\n", irecv_strerror(error));
}
} else
@@ -71,7 +73,8 @@ void parse_command(irecv_client_t client, unsigned char* command, unsigned int s
char* filename = strtok(NULL, " ");
debug("Sending exploit %s\n", filename);
if (filename != NULL) {
- irecv_send_file(client, filename);
+ error = irecv_send_file(client, filename);
+ debug("%s\n", irecv_strerror(error));
}
irecv_send_exploit(client);
} else