All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: <szymon.janc@tieto.com>, Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
Subject: [PATCH 3/3] android/gatt: Add info debug to connect function
Date: Sun, 23 Mar 2014 21:20:10 +0100	[thread overview]
Message-ID: <1395606010-19807-3-git-send-email-lukasz.rymanowski@tieto.com> (raw)
In-Reply-To: <1395606010-19807-1-git-send-email-lukasz.rymanowski@tieto.com>

Because we handle connect always in "auto connect" mode we want this
info log to give us idea how BLE applications use that.

Also add comment about we handle is_direct in this function.
---
 android/gatt.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/android/gatt.c b/android/gatt.c
index 5384a72..705a441 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -636,8 +636,15 @@ static void handle_client_connect(const void *buf, uint16_t len)
 	bdaddr_t addr;
 	uint8_t status;
 	bool send_notify = false;
+	char a[18];
 
-	DBG("");
+	/* For now we handle direct connect in the same way as auto.
+	 * connect. This is to avoid issues with broken applications which
+	 * might block HCI by calling connect to device not in range. However
+	 * we can consider later to change that.
+	*/
+	ba2str((bdaddr_t *)&cmd->bdaddr, a);
+	info("gatt: Connect to: %s(is_direct=%d)", a, cmd->is_direct);
 
 	/* Check if client is registered */
 	l = queue_find(gatt_clients, match_client_by_id,
-- 
1.8.4


  parent reply	other threads:[~2014-03-23 20:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-23 20:20 [PATCH 1/3] android/gatt: Fix scan handling Lukasz Rymanowski
2014-03-23 20:20 ` [PATCH 2/3] android/gatt: Restart scan after connection Lukasz Rymanowski
2014-03-23 20:20 ` Lukasz Rymanowski [this message]
2014-03-24 13:08 ` [PATCH 1/3] android/gatt: Fix scan handling 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=1395606010-19807-3-git-send-email-lukasz.rymanowski@tieto.com \
    --to=lukasz.rymanowski@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=szymon.janc@tieto.com \
    /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.