diff options
author | Nikias Bassen | 2019-10-29 09:56:17 +0100 |
---|---|---|
committer | Nikias Bassen | 2019-10-29 09:58:28 +0100 |
commit | 8872aec759699411be45a17798dab40b9539c2ae (patch) | |
tree | cf67d7e62c25bb8ab6dab03cd8291a38f324f0d3 | |
parent | 4f8ed2eba843dbf3a17243d75414a96a9b330942 (diff) | |
download | libimobiledevice-8872aec759699411be45a17798dab40b9539c2ae.tar.gz libimobiledevice-8872aec759699411be45a17798dab40b9539c2ae.tar.bz2 |
property_list_service: Consider a successful 0 byte read a timeout rather than an error condition
-rw-r--r-- | src/property_list_service.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/property_list_service.c b/src/property_list_service.c index 1cb8dc9..9d47fd6 100644 --- a/src/property_list_service.c +++ b/src/property_list_service.c @@ -197,6 +197,11 @@ static property_list_service_error_t internal_plist_receive_timeout(property_lis return service_to_property_list_service_error(serr); } + if (bytes == 0) { + /* success but 0 bytes length, assume timeout */ + return PROPERTY_LIST_SERVICE_E_RECEIVE_TIMEOUT; + } + debug_info("initial read=%i", bytes); uint32_t curlen = 0; |