diff options
| author | 2019-10-29 09:56:17 +0100 | |
|---|---|---|
| committer | 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 | |||
| 197 | return service_to_property_list_service_error(serr); | 197 | return service_to_property_list_service_error(serr); |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | if (bytes == 0) { | ||
| 201 | /* success but 0 bytes length, assume timeout */ | ||
| 202 | return PROPERTY_LIST_SERVICE_E_RECEIVE_TIMEOUT; | ||
| 203 | } | ||
| 204 | |||
| 200 | debug_info("initial read=%i", bytes); | 205 | debug_info("initial read=%i", bytes); |
| 201 | 206 | ||
| 202 | uint32_t curlen = 0; | 207 | uint32_t curlen = 0; |
