[RFCV2 01/28] android/ipc: Add ipc_is_connected() check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

Checks that ipc is connected
---
 android/ipc.c | 5 +++++
 android/ipc.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/android/ipc.c b/android/ipc.c
index 8cd34ea..137e6f9 100644
--- a/android/ipc.c
+++ b/android/ipc.c
@@ -287,6 +287,11 @@ static gboolean cmd_connect_cb(GIOChannel *io, GIOCondition cond,
 	return FALSE;
 }
 
+bool ipc_is_connected(struct ipc *ipc)
+{
+	return ipc->cmd_watch;
+}
+
 struct ipc *ipc_init(const char *path, size_t size, int max_service_id,
 					bool notifications,
 					ipc_disconnect_cb cb, void *cb_data)
diff --git a/android/ipc.h b/android/ipc.h
index cc4e92d..171a77c 100644
--- a/android/ipc.h
+++ b/android/ipc.h
@@ -36,6 +36,7 @@ struct ipc;
 
 typedef void (*ipc_disconnect_cb) (void *data);
 
+bool ipc_is_connected(struct ipc *ipc);
 struct ipc *ipc_init(const char *path, size_t size, int max_service_id,
 					bool notifications,
 					ipc_disconnect_cb cb, void *cb_data);
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux