diff options
author | Nikias Bassen | 2019-09-26 04:49:54 +0200 |
---|---|---|
committer | Nikias Bassen | 2019-09-26 04:49:54 +0200 |
commit | dbcab8bca5b061c90b81ba87955cdb6421ad751b (patch) | |
tree | 3936d4bc2b6024db97b262a512df3c438d27802b /src | |
parent | a18ad835cb84268fa07118cf6abed01d1e93856a (diff) | |
download | idevicerestore-dbcab8bca5b061c90b81ba87955cdb6421ad751b.tar.gz idevicerestore-dbcab8bca5b061c90b81ba87955cdb6421ad751b.tar.bz2 |
restore: Only use timeout error if it is actually defined
Diffstat (limited to 'src')
-rw-r--r-- | src/restore.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/restore.c b/src/restore.c index 1cc8b9a..0ea8a45 100644 --- a/src/restore.c +++ b/src/restore.c @@ -21,6 +21,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -2790,6 +2793,7 @@ int restore_device(struct idevicerestore_client_t* client, plist_t build_identit } restore_error = restored_receive(restore, &message); +#ifdef HAVE_RESTORE_E_RECEIVE_TIMEOUT if (restore_error == RESTORE_E_RECEIVE_TIMEOUT) { debug("No data to read (timeout)\n"); message = NULL; @@ -2799,6 +2803,13 @@ int restore_device(struct idevicerestore_client_t* client, plist_t build_identit err = -11; break; } +#else + if (restore_error != RESTORE_E_SUCCESS) { + debug("No data to read\n"); + message = NULL; + continue; + } +#endif // discover what kind of message has been received node = plist_dict_get_item(message, "MsgType"); |