[PATCH 04/10] android/client: Add init/cleanup for GATT

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

 



This patch adds gatt functions code.
---
 android/client/if-gatt.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
index db5494c..90cc805 100644
--- a/android/client/if-gatt.c
+++ b/android/client/if-gatt.c
@@ -496,12 +496,20 @@ static const btgatt_callbacks_t gatt_cbacks = {
 
 static void init_p(int argc, const char **argv)
 {
+	RETURN_IF_NULL(if_gatt);
+
+	EXEC(if_gatt->init, &gatt_cbacks);
 }
 
 /* cleanup */
 
 static void cleanup_p(int argc, const char **argv)
 {
+	RETURN_IF_NULL(if_gatt);
+
+	EXECV(if_gatt->cleanup);
+
+	if_gatt = NULL;
 }
 
 static struct method methods[] = {
-- 
1.7.9.5

--
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