summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicesyslog.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/idevicesyslog.c b/tools/idevicesyslog.c
index dcd8df6..f2b3a2f 100644
--- a/tools/idevicesyslog.c
+++ b/tools/idevicesyslog.c
@@ -118,6 +118,11 @@ int main(int argc, char *argv[])
uint32_t datalen = 0, bytes = 0, recv_bytes = 0;
ret = idevice_connection_receive(conn, (char *) &datalen, sizeof(datalen), &bytes);
+ if (ret < 0) {
+ fprintf(stderr, "Error receiving data. Exiting...\n");
+ break;
+ }
+
datalen = GUINT32_FROM_BE(datalen);
if (datalen == 0)