summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-03-07 23:00:56 +0100
committerGravatar Martin Szulecki2013-03-07 23:00:56 +0100
commitf8052bed10e9d170aa0858a04fbeeb1a994ce307 (patch)
tree4dd0632cf06751acb8d02ad64721f4ce2a412d03
parentb5a7434997c4668cc66b3e6a9527bd3922cf6f0d (diff)
downloadlibimobiledevice-f8052bed10e9d170aa0858a04fbeeb1a994ce307.tar.gz
libimobiledevice-f8052bed10e9d170aa0858a04fbeeb1a994ce307.tar.bz2
ideviceheartbeat: Report if starting the service failed
-rw-r--r--dev/ideviceheartbeat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dev/ideviceheartbeat.c b/dev/ideviceheartbeat.c
index 89fe742..d108766 100644
--- a/dev/ideviceheartbeat.c
+++ b/dev/ideviceheartbeat.c
@@ -102,9 +102,12 @@ int main(int argc, char *argv[])
/* start heartbeat service on device */
heartbeat_client_start_service(device, &heartbeat, "ideviceheartbeat");
-
if (heartbeat) {
printf("< heartbeat started, listening...\n");
+ } else {
+ printf("Failed to start heartbeat service\n");
+ idevice_free(device);
+ return -1;
}
/* main loop */