diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/idevice.c | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/src/idevice.c b/src/idevice.c index d6c1d06..f64570b 100644 --- a/src/idevice.c +++ b/src/idevice.c @@ -650,7 +650,10 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_send(idevice_connection_  		}  		debug_info("len %d, sent %d", len, sent);  		if (sent < len) { -			*sent_bytes = 0; +			*sent_bytes = sent; +			if (sent == 0) { +				return IDEVICE_E_UNKNOWN_ERROR; +			}  			return IDEVICE_E_NOT_ENOUGH_DATA;  		}  		*sent_bytes = sent; | 
