diff options
| author | 2014-03-14 14:52:19 +0100 | |
|---|---|---|
| committer | 2014-03-14 14:52:19 +0100 | |
| commit | 7aa87fe71df068e798fe002ac785477d4e22c918 (patch) | |
| tree | 23f6633e2ba584863a940ebc468114d99e0e3fc3 /src | |
| parent | 613ec55ae6441c0177859ac7f49b92a133979465 (diff) | |
| download | ideviceinstaller-7aa87fe71df068e798fe002ac785477d4e22c918.tar.gz ideviceinstaller-7aa87fe71df068e798fe002ac785477d4e22c918.tar.bz2 | |
print AFC error code in case afc_file_write fails
Diffstat (limited to 'src')
| -rw-r--r-- | src/ideviceinstaller.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c index e1f995b..fc22446 100644 --- a/src/ideviceinstaller.c +++ b/src/ideviceinstaller.c | |||
| @@ -491,8 +491,9 @@ static int afc_upload_file(afc_client_t afc, const char* filename, const char* d | |||
| 491 | uint32_t written, total = 0; | 491 | uint32_t written, total = 0; |
| 492 | while (total < amount) { | 492 | while (total < amount) { |
| 493 | written = 0; | 493 | written = 0; |
| 494 | if (afc_file_write(afc, af, buf, amount, &written) != AFC_E_SUCCESS) { | 494 | afc_error_t aerr = afc_file_write(afc, af, buf, amount, &written); |
| 495 | fprintf(stderr, "AFC Write error!\n"); | 495 | if (aerr != AFC_E_SUCCESS) { |
| 496 | fprintf(stderr, "AFC Write error: %d\n", aerr); | ||
| 496 | break; | 497 | break; |
| 497 | } | 498 | } |
| 498 | total += written; | 499 | total += written; |
