Linux bluetooth development
 help / color / mirror / Atom feed
From: Jerzy Kasenberg <jerzy.kasenberg@tieto.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: Jerzy Kasenberg <jerzy.kasenberg@tieto.com>
Subject: [PATCH 04/10] android/client: Add init/cleanup for GATT
Date: Thu, 31 Oct 2013 11:45:09 +0100	[thread overview]
Message-ID: <1383216315-30627-5-git-send-email-jerzy.kasenberg@tieto.com> (raw)
In-Reply-To: <1383216315-30627-1-git-send-email-jerzy.kasenberg@tieto.com>

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


  parent reply	other threads:[~2013-10-31 10:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-31 10:45 [PATCH 00/10] Add GATT support to haltest Jerzy Kasenberg
2013-10-31 10:45 ` [PATCH 01/10] android/client: Add skeleton for GATT interface Jerzy Kasenberg
2013-10-31 10:45 ` [PATCH 02/10] android/client: Add GATT client callbacks code Jerzy Kasenberg
2013-10-31 10:45 ` [PATCH 03/10] android/client: Add complex GATT type formating Jerzy Kasenberg
2013-10-31 10:45 ` Jerzy Kasenberg [this message]
2013-10-31 10:45 ` [PATCH 05/10] android/client: Add helper macros to verify args Jerzy Kasenberg
2013-10-31 10:45 ` [PATCH 06/10] android/client: Add GATT client method calls Jerzy Kasenberg
2013-10-31 10:45 ` [PATCH 07/10] android/client: Add GATT complex type parsing Jerzy Kasenberg
2013-10-31 10:45 ` [PATCH 08/10] android/client: Add tab completion to GATT client Jerzy Kasenberg
2013-10-31 10:45 ` [PATCH 09/10] android/client: Add GATT server callbacks code Jerzy Kasenberg
2013-10-31 10:45 ` [PATCH 10/10] android/client: Add GATT server methods Jerzy Kasenberg
2013-10-31 14:03 ` [PATCH 00/10] Add GATT support to haltest Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383216315-30627-5-git-send-email-jerzy.kasenberg@tieto.com \
    --to=jerzy.kasenberg@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox