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] gattrib: Fix not setting att's mtu size in g_attrib_new()
Date: Mon, 01 Dec 2014 13:04:29 +0100	[thread overview]
Message-ID: <4166522.DpxecVtL7L@uw000953> (raw)
In-Reply-To: <1416991551-21617-1-git-send-email-jakub.tyszkowski@tieto.com>

Hi Jakub,

On Wednesday 26 of November 2014 09:45:50 Jakub Tyszkowski wrote:
> We were setting only the buffer in gattrib but att was left with the
> default value of 23 (LE transport layer defaults). For BREDR transport
> layer this may result in using smaller MTU than the minimum allowed (48).
> 
> This was affecting cases when MTU Exchange was not supported by the
> remote device and defaults were used.
> ---
>  attrib/gattrib.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/attrib/gattrib.c b/attrib/gattrib.c
> index ce7f7b3..a04a0ee 100644
> --- a/attrib/gattrib.c
> +++ b/attrib/gattrib.c
> @@ -83,6 +83,9 @@ GAttrib *g_attrib_new(GIOChannel *io, guint16 mtu)
>  	if (!attr->att)
>  		goto fail;
>  
> +	if (!bt_att_set_mtu(attr->att, mtu))
> +		goto fail;
> +
>  	attr->buf = malloc0(mtu);
>  	attr->buflen = mtu;
>  	if (!attr->buf)

This patch is now applied. thanks. 

-- 
Best regards, 
Szymon Janc

      parent reply	other threads:[~2014-12-01 12:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26  8:45 [PATCH 1/2] gattrib: Fix not setting att's mtu size in g_attrib_new() Jakub Tyszkowski
2014-11-26  8:45 ` [PATCH 2/2] gattrib: Fix not changing the buffer size when mtu is reduced Jakub Tyszkowski
2014-12-01 12: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=4166522.DpxecVtL7L@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