diff options
| author | 2015-12-18 20:46:46 +0100 | |
|---|---|---|
| committer | 2015-12-18 20:46:46 +0100 | |
| commit | 2203f4cba9ddaacee1ad702b7948da0e59d33497 (patch) | |
| tree | 1bc906dadeb880e69a3f0295e462367502ca984a /tools | |
| parent | 6070126868069f2ee01ea9414f4cfbe5de285267 (diff) | |
| download | libimobiledevice-2203f4cba9ddaacee1ad702b7948da0e59d33497.tar.gz libimobiledevice-2203f4cba9ddaacee1ad702b7948da0e59d33497.tar.bz2 | |
tools: Fix inverted abort condition in idevicecrashreport
This bug caused it to never wait for the 'ping' message from
the crashreportmover service
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/idevicecrashreport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/idevicecrashreport.c b/tools/idevicecrashreport.c index 7ac9baf..8c04fd1 100644 --- a/tools/idevicecrashreport.c +++ b/tools/idevicecrashreport.c | |||
| @@ -405,7 +405,7 @@ int main(int argc, char* argv[]) { | |||
| 405 | /* read "ping" message which indicates the crash logs have been moved to a safe harbor */ | 405 | /* read "ping" message which indicates the crash logs have been moved to a safe harbor */ |
| 406 | char *ping = malloc(4); | 406 | char *ping = malloc(4); |
| 407 | int attempts = 0; | 407 | int attempts = 0; |
| 408 | while ((strncmp(ping, "ping", 4) != 0) && (attempts > 10)) { | 408 | while ((strncmp(ping, "ping", 4) != 0) && (attempts < 10)) { |
| 409 | uint32_t bytes = 0; | 409 | uint32_t bytes = 0; |
| 410 | device_error = idevice_connection_receive_timeout(connection, ping, 4, &bytes, 2000); | 410 | device_error = idevice_connection_receive_timeout(connection, ping, 4, &bytes, 2000); |
| 411 | if ((bytes == 0) && (device_error == IDEVICE_E_SUCCESS)) { | 411 | if ((bytes == 0) && (device_error == IDEVICE_E_SUCCESS)) { |
