Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@tieto.com>
To: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/2] android/client: Fix service search command
Date: Fri, 14 Mar 2014 16:04:44 +0100	[thread overview]
Message-ID: <5863711.19WqRRrd8e@uw000953> (raw)
In-Reply-To: <1394806051-8160-1-git-send-email-lukasz.rymanowski@tieto.com>

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

      parent reply	other threads:[~2014-03-14 15:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

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=5863711.19WqRRrd8e@uw000953 \
    --to=szymon.janc@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=lukasz.rymanowski@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox