diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2013-10-23 13:26:38 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-10-23 14:02:07 +0300 |
commit | 3adac8d71583170d14a2f72e101b9d12a253f9e4 (patch) | |
tree | 94428c32ef60f5c9acfd2b4719af2a1cca256368 /android/hal-ipc.c | |
parent | de10a3d060596b575c2e30b7b2b0cdc169ead03b (diff) | |
download | bluez-3adac8d71583170d14a2f72e101b9d12a253f9e4.tar.gz |
android: Check that service is started
Add check that we are able to start Bluetooth service in
Android. If service is not started we should not try to connect to it.
Diffstat (limited to 'android/hal-ipc.c')
-rw-r--r-- | android/hal-ipc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/android/hal-ipc.c b/android/hal-ipc.c index 2d58038fa..a7948a60d 100644 --- a/android/hal-ipc.c +++ b/android/hal-ipc.c @@ -204,7 +204,11 @@ bool hal_ipc_init(void) } /* Start Android Bluetooth daemon service */ - property_set("ctl.start", SERVICE_NAME); + if (property_set("ctl.start", SERVICE_NAME) < 0) { + error("Failed to start service %s", SERVICE_NAME); + close(sk); + return false; + } cmd_sk = accept_connection(sk); if (cmd_sk < 0) { |