diff options
| author | 2010-07-22 00:12:16 +0200 | |
|---|---|---|
| committer | 2010-07-22 00:12:16 +0200 | |
| commit | 97c707ec3928c89c5a22ffdf06d5510f386eaf35 (patch) | |
| tree | 387bd8486cfa4d687728328a562cdf00895f95e9 /src | |
| parent | 689da0f6a73199b3afb7b3fbe05d03908c1276d9 (diff) | |
| download | libirecovery-97c707ec3928c89c5a22ffdf06d5510f386eaf35.tar.gz libirecovery-97c707ec3928c89c5a22ffdf06d5510f386eaf35.tar.bz2 | |
Also report the error after file transfers
Diffstat (limited to 'src')
| -rw-r--r-- | src/irecovery.c | 7 | 
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 | 
