Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@tieto.com>
To: Jakub Tyszkowski <jakub.tyszkowski@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/2] android/gatt: Fix embeded services not responsing to some requests
Date: Thu, 18 Dec 2014 11:02:36 +0100	[thread overview]
Message-ID: <10592153.5tJcofLVcF@uw000953> (raw)
In-Reply-To: <1418731357-8531-1-git-send-email-jakub.tyszkowski@tieto.com>

Hi Jakub,

On Tuesday 16 of December 2014 13:02:36 Jakub Tyszkowski wrote:
> For application attributes this is triggered when application sends response but
> for embeded ones we need to trigger this manually. As in prepare and execute
> write requests handlers we don't know if its embeded or application attribute,
> we should try sending processed request responses if there are any.
> ---
>  android/gatt.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/android/gatt.c b/android/gatt.c
> index 2aa52b0..1e2627b 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -4414,6 +4414,9 @@ static void send_dev_complete_response(struct gatt_device *device,
>  	uint16_t len = 0;
>  	uint8_t error = 0;
>  
> +	if (queue_isempty(device->pending_requests))
> +		return;
> +
>  	if (queue_find(device->pending_requests, match_pending_dev_request,
>  									NULL)) {
>  		DBG("Still pending requests");
> @@ -6513,6 +6516,8 @@ static uint8_t write_prep_request(const uint8_t *cmd, uint16_t cmd_len,
>  		return ATT_ECODE_UNLIKELY;
>  	}
>  
> +	send_dev_complete_response(dev, cmd[0]);
> +
>  	return 0;
>  }
>  
> @@ -6572,6 +6577,7 @@ static uint8_t write_execute_request(const uint8_t *cmd, uint16_t cmd_len,
>  	}
>  
>  	queue_foreach(app_connections, send_server_write_execute_notify, &ev);
> +	send_dev_complete_response(dev, cmd[0]);
>  
>  	return 0;
>  }
> 

This patch is now applied, thanks.

-- 
Best regards, 
Szymon Janc

      parent reply	other threads:[~2014-12-18 10:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16 12:02 [PATCH 1/2] android/gatt: Fix embeded services not responsing to some requests Jakub Tyszkowski
2014-12-16 12:02 ` [PATCH 2/2] android/gatt: Report error on invalid value length for CCC descriptor Jakub Tyszkowski
2014-12-18 10:47   ` Szymon Janc
2014-12-18 10:02 ` 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=10592153.5tJcofLVcF@uw000953 \
    --to=szymon.janc@tieto.com \
    --cc=jakub.tyszkowski@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