OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
058537f
)
android/hal: Use notification socket for daemon lifetime tracking
author
Szymon Janc
<szymon.janc@tieto.com>
Tue, 22 Oct 2013 13:24:58 +0000
(15:24 +0200)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Tue, 22 Oct 2013 13:58:35 +0000
(16:58 +0300)
If daemon exited unexpectedly HAL should be stop. With cleanup
procedure command socket is closed as first so use that to distinguish
correct action.
android/hal-ipc.c
patch
|
blob
|
history
diff --git
a/android/hal-ipc.c
b/android/hal-ipc.c
index
16f2bd3
..
f753f10
100644
(file)
--- a/
android/hal-ipc.c
+++ b/
android/hal-ipc.c
@@
-88,8
+88,13
@@
static void *notification_handler(void *data)
}
/* socket was shutdown */
- if (ret == 0)
- break;
+ if (ret == 0) {
+ if (cmd_sk == -1)
+ break;
+
+ error("Notification socket closed, aborting");
+ exit(EXIT_FAILURE);
+ }
if (ret < (ssize_t) sizeof(*hal_msg)) {
error("Too small notification (%zd bytes), aborting",