summaryrefslogtreecommitdiff
path: root/android/ipc.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2013-11-28 15:15:21 +0100
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-11-28 18:02:26 +0200
commit4f1d080aa7510111c1d5f795d3ce4b369568fee6 (patch)
tree4341d84b9910ec604d41b6a5b198337f124b058f /android/ipc.c
parenta58d20e41812d7c0e01d0cf5f63ddee420be0ac7 (diff)
downloadbluez-4f1d080aa7510111c1d5f795d3ce4b369568fee6.tar.gz
android: Initialize IPC with command and notification sockets
Pass sockets after succesfully connected to HAL. This will allow to improve IPC helpers API.
Diffstat (limited to 'android/ipc.c')
-rw-r--r--android/ipc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/android/ipc.c b/android/ipc.c
index 25c36fd3c..028d4ad4f 100644
--- a/android/ipc.c
+++ b/android/ipc.c
@@ -36,6 +36,21 @@
#include "ipc.h"
#include "log.h"
+static int cmd_sk = -1;
+static int notif_sk = -1;
+
+void ipc_init(int command_sk, int notification_sk)
+{
+ cmd_sk = command_sk;
+ notif_sk = notification_sk;
+}
+
+void ipc_cleanup(void)
+{
+ cmd_sk = -1;
+ notif_sk = -1;
+}
+
void ipc_send(int sk, uint8_t service_id, uint8_t opcode, uint16_t len,
void *param, int fd)
{