From: Marcin Kraglak <marcin.kraglak@tieto.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 2/3] android/gatt: Search included services in Secondary Services
Date: Wed, 5 Nov 2014 14:01:50 +0100 [thread overview]
Message-ID: <1415192511-7651-2-git-send-email-marcin.kraglak@tieto.com> (raw)
In-Reply-To: <1415192511-7651-1-git-send-email-marcin.kraglak@tieto.com>
Check type of service and perform include service discovery with valid
range.
---
android/gatt.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/android/gatt.c b/android/gatt.c
index 87a7a12..1edc8b0 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -2412,6 +2412,7 @@ static bool search_included_services(struct app_connection *connection,
struct service *service)
{
struct get_included_data *data;
+ uint16_t start, end;
data = new0(struct get_included_data, 1);
if (!data) {
@@ -2422,9 +2423,17 @@ static bool search_included_services(struct app_connection *connection,
data->prim = service;
data->conn = connection;
- gatt_find_included(connection->device->attrib,
- service->prim.range.start,
- service->prim.range.end, get_included_cb, data);
+ if (service->primary) {
+ start = service->prim.range.start;
+ end = service->prim.range.end;
+ } else {
+ start = service->incl.range.start;
+ end = service->incl.range.end;
+ }
+
+ gatt_find_included(connection->device->attrib, start, end,
+ get_included_cb, data);
+
return true;
}
--
1.9.3
next prev parent reply other threads:[~2014-11-05 13:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 13:01 [PATCH 1/3] android/gatt: Initialize includes queue Marcin Kraglak
2014-11-05 13:01 ` Marcin Kraglak [this message]
2014-11-05 13:01 ` [PATCH 3/3] android/pts: Update GATT PTS test results Marcin Kraglak
2014-11-06 15:19 ` Szymon Janc
2014-11-06 11:19 ` [PATCH 1/3] android/gatt: Initialize includes queue 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=1415192511-7651-2-git-send-email-marcin.kraglak@tieto.com \
--to=marcin.kraglak@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