* [PATCH 1/2] android/client: Fix service search command
@ 2014-03-14 14:07 Lukasz Rymanowski
2014-03-14 14:07 ` [PATCH 2/2] android/client: Minor fix in print status Lukasz Rymanowski
2014-03-14 15:04 ` [PATCH 1/2] android/client: Fix service search command Szymon Janc
0 siblings, 2 replies; 3+ messages in thread
From: Lukasz Rymanowski @ 2014-03-14 14:07 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Lukasz Rymanowski
We should be able to send NULL in case we want all the primary seavices
---
android/client/if-gatt.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
index e8837ff..d58fc4b 100644
--- a/android/client/if-gatt.c
+++ b/android/client/if-gatt.c
@@ -961,19 +961,21 @@ static void search_service_c(int argc, const char **argv, enum_func *enum_func,
static void search_service_p(int argc, const char **argv)
{
int conn_id;
- bt_uuid_t filter_uuid;
RETURN_IF_NULL(if_gatt);
VERIFY_CONN_ID(2, conn_id);
/* uuid */
- if (argc <= 3)
- memset(&filter_uuid, 0, sizeof(bt_uuid_t));
- else
- gatt_str2bt_uuid_t(argv[3], -1, &filter_uuid);
+ if (argc <= 3) {
+ EXEC(if_gatt->client->search_service, conn_id, NULL);
- EXEC(if_gatt->client->search_service, conn_id, &filter_uuid);
+ } else {
+ bt_uuid_t filter_uuid;
+
+ gatt_str2bt_uuid_t(argv[3], -1, &filter_uuid);
+ EXEC(if_gatt->client->search_service, conn_id, &filter_uuid);
+ }
}
/* get_included_service */
--
1.8.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] android/client: Minor fix in print status
2014-03-14 14:07 [PATCH 1/2] android/client: Fix service search command Lukasz Rymanowski
@ 2014-03-14 14:07 ` Lukasz Rymanowski
2014-03-14 15:04 ` [PATCH 1/2] android/client: Fix service search command Szymon Janc
1 sibling, 0 replies; 3+ messages in thread
From: Lukasz Rymanowski @ 2014-03-14 14:07 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Lukasz Rymanowski
---
android/client/if-gatt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
index d58fc4b..80fd0f0 100644
--- a/android/client/if-gatt.c
+++ b/android/client/if-gatt.c
@@ -429,7 +429,7 @@ static void gattc_disconnect_cb(int conn_id, int status, int client_if,
*/
static void gattc_search_complete_cb(int conn_id, int status)
{
- haltest_info("%s: conn_id=%d status=%s\n", __func__, conn_id, status);
+ haltest_info("%s: conn_id=%d status=%d\n", __func__, conn_id, status);
}
/* Reports GATT services on a remote device */
--
1.8.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] android/client: Fix service search command
2014-03-14 14:07 [PATCH 1/2] android/client: Fix service search command Lukasz Rymanowski
2014-03-14 14:07 ` [PATCH 2/2] android/client: Minor fix in print status Lukasz Rymanowski
@ 2014-03-14 15:04 ` Szymon Janc
1 sibling, 0 replies; 3+ messages in thread
From: Szymon Janc @ 2014-03-14 15:04 UTC (permalink / raw)
To: Lukasz Rymanowski; +Cc: linux-bluetooth
Hi Łukasz,
On Friday 14 of March 2014 15:07:30 Lukasz Rymanowski wrote:
> We should be able to send NULL in case we want all the primary seavices
> ---
> android/client/if-gatt.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
> index e8837ff..d58fc4b 100644
> --- a/android/client/if-gatt.c
> +++ b/android/client/if-gatt.c
> @@ -961,19 +961,21 @@ static void search_service_c(int argc, const char **argv, enum_func *enum_func,
> static void search_service_p(int argc, const char **argv)
> {
> int conn_id;
> - bt_uuid_t filter_uuid;
>
> RETURN_IF_NULL(if_gatt);
>
> VERIFY_CONN_ID(2, conn_id);
>
> /* uuid */
> - if (argc <= 3)
> - memset(&filter_uuid, 0, sizeof(bt_uuid_t));
> - else
> - gatt_str2bt_uuid_t(argv[3], -1, &filter_uuid);
> + if (argc <= 3) {
> + EXEC(if_gatt->client->search_service, conn_id, NULL);
>
> - EXEC(if_gatt->client->search_service, conn_id, &filter_uuid);
> + } else {
> + bt_uuid_t filter_uuid;
> +
> + gatt_str2bt_uuid_t(argv[3], -1, &filter_uuid);
> + EXEC(if_gatt->client->search_service, conn_id, &filter_uuid);
> + }
> }
>
> /* get_included_service */
>
Both patches applied, thanks.
--
Best regards,
Szymon Janc
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-14 15:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-14 14:07 [PATCH 1/2] android/client: Fix service search command Lukasz Rymanowski
2014-03-14 14:07 ` [PATCH 2/2] android/client: Minor fix in print status Lukasz Rymanowski
2014-03-14 15:04 ` [PATCH 1/2] android/client: Fix service search command Szymon Janc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox