All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
To: linux-bluetooth@vger.kernel.org
Cc: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
Subject: [PATCH 05/16] android/gatt: Add tracking for autoconnect apps
Date: Tue,  2 Sep 2014 12:09:50 +0200	[thread overview]
Message-ID: <1409652601-28689-6-git-send-email-lukasz.rymanowski@tieto.com> (raw)
In-Reply-To: <1409652601-28689-1-git-send-email-lukasz.rymanowski@tieto.com>

Lets start to track which applications are interested in autoconnect
---
 android/gatt.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/android/gatt.c b/android/gatt.c
index aea0a9f..f526c16 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -164,6 +164,8 @@ struct gatt_device {
 	int ref;
 	int conn_cnt;
 
+	struct queue *autoconnect_apps;
+
 	struct queue *pending_requests;
 };
 
@@ -682,6 +684,7 @@ static void destroy_device(void *data)
 
 	queue_destroy(dev->services, destroy_service);
 	queue_destroy(dev->pending_requests, destroy_pending_request);
+	queue_destroy(dev->autoconnect_apps, NULL);
 
 	free(dev);
 }
@@ -724,6 +727,12 @@ static struct gatt_device *create_device(const bdaddr_t *addr)
 		return NULL;
 	}
 
+	dev->autoconnect_apps = queue_new();
+	if (!dev->autoconnect_apps) {
+		error("gatt: Failed to allocate memory for client");
+		destroy_device(dev);
+		return NULL;
+	}
 
 	dev->pending_requests = queue_new();
 	if (!dev->pending_requests) {
-- 
1.8.4


  parent reply	other threads:[~2014-09-02 10:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 10:09 [PATCH 00/16] Move reconnect logic from HOG to GATT Lukasz Rymanowski
2014-09-02 10:09 ` [PATCH 01/16] android/gatt: Fix for device type in gatt Lukasz Rymanowski
2014-09-02 10:09 ` [PATCH 02/16] android/hidhost: Remove invalid connecting state notification Lukasz Rymanowski
2014-09-02 10:09 ` [PATCH 03/16] android/hidhost: Allow to use cached dev when connecting Lukasz Rymanowski
2014-09-02 10:09 ` [PATCH 04/16] android/bluetooth: Add tracking if device is in white list Lukasz Rymanowski
2014-09-02 10:09 ` Lukasz Rymanowski [this message]
2014-09-02 10:09 ` [PATCH 06/16] android/gatt: Add API to autoconnect GATT based devices Lukasz Rymanowski
2014-09-02 10:09 ` [PATCH 07/16] android/gatt: Add API to remove autoconnect GATT based device Lukasz Rymanowski
2014-09-02 15:27   ` Szymon Janc
2014-09-03  6:55     ` Lukasz Rymanowski
2014-09-02 10:09 ` [PATCH 08/16] android/gatt: Unsubscribe from autoconnect on unregister Lukasz Rymanowski
2014-09-02 10:09 ` [PATCH 09/16] android/gatt: Extract remove_autoconnect_device helper Lukasz Rymanowski
2014-09-02 10:09 ` [PATCH 10/16] android/gatt: Move find_conn up in the file Lukasz Rymanowski
2014-09-02 10:09 ` [PATCH 11/16] android/gatt: Notify apps interested in autoconnect about connection Lukasz Rymanowski
2014-09-02 10:09 ` [PATCH 12/16] android/gatt: Extract trigger le connection to new function Lukasz Rymanowski
2014-09-02 10:09 ` [PATCH 13/16] android/gatt: Move auto_connect_le() up in the file Lukasz Rymanowski
2014-09-02 10:09 ` [PATCH 14/16] android/gatt: Make sure GATT will reconnect after disconnection Lukasz Rymanowski
2014-09-02 10:10 ` [PATCH 15/16] android/gatt: Remove device from white list on device destroy Lukasz Rymanowski
2014-09-02 10:10 ` [PATCH 16/16] android/hidhost: Remove reconnect logic Lukasz Rymanowski
2014-09-02 15:19 ` [PATCH 00/16] Move reconnect logic from HOG to GATT Szymon Janc

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=1409652601-28689-6-git-send-email-lukasz.rymanowski@tieto.com \
    --to=lukasz.rymanowski@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.