Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@tieto.com>
To: Mariusz Skamra <mariusz.skamra@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] android/gatt: Add callback for test command
Date: Thu, 11 Dec 2014 15:14:33 +0100	[thread overview]
Message-ID: <1670022.J8tim6EklZ@uw000953> (raw)
In-Reply-To: <1418306706-21479-1-git-send-email-mariusz.skamra@tieto.com>

Hi Mariusz,

On Thursday 11 of December 2014 15:05:06 Mariusz Skamra wrote:
> It is needed in new gattrib. Without callback command won't be send.
> ---
>  android/gatt.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/android/gatt.c b/android/gatt.c
> index 8a81852..1b38a51 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -4053,6 +4053,12 @@ failed:
>  				HAL_OP_GATT_CLIENT_SET_ADV_DATA, status);
>  }
>  
> +static void test_command_result(guint8 status, const guint8 *pdu,
> +					guint16 len, gpointer user_data)
> +{
> +	DBG("status: %d", status);
> +}
> +
>  static uint8_t test_read_write(bdaddr_t *bdaddr, bt_uuid_t *uuid, uint16_t op,
>  						uint16_t u2,uint16_t u3,
>  						uint16_t u4, uint16_t u5)
> @@ -4114,7 +4120,8 @@ static uint8_t test_read_write(bdaddr_t *bdaddr, bt_uuid_t *uuid, uint16_t op,
>  	if (!length)
>  		return HAL_STATUS_FAILED;
>  
> -	g_attrib_send(dev->attrib, 0, pdu, length, NULL, NULL, NULL);
> +	g_attrib_send(dev->attrib, 0, pdu, length, test_command_result, NULL,
> +									NULL);
>  
>  	return HAL_STATUS_SUCCESS;
>  }

Applied, thanks. 

-- 
Best regards, 
Szymon Janc

      reply	other threads:[~2014-12-11 14:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-11 14:05 [PATCH] android/gatt: Add callback for test command Mariusz Skamra
2014-12-11 14:14 ` 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=1670022.J8tim6EklZ@uw000953 \
    --to=szymon.janc@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=mariusz.skamra@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