From 97c707ec3928c89c5a22ffdf06d5510f386eaf35 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Thu, 22 Jul 2010 00:12:16 +0200 Subject: Also report the error after file transfers --- src/irecovery.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/irecovery.c') 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 -- cgit v1.1-32-gdbae