diff options
author | Jakub Tyszkowski <jakub.tyszkowski@tieto.com> | 2014-11-26 09:45:50 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-12-01 13:02:35 +0100 |
commit | 7dcd7babce72bab490d2372d6b6668a0c8b7df0b (patch) | |
tree | 9fbed8d4eccd405353d98613f6fe59514577713b /attrib | |
parent | 72bc4cec9e16379c2d5ed1230c2756fca2f192bf (diff) | |
download | bluez-7dcd7babce72bab490d2372d6b6668a0c8b7df0b.tar.gz |
gattrib: Fix not setting att's mtu size in g_attrib_new()
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.
Diffstat (limited to 'attrib')
-rw-r--r-- | attrib/gattrib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/attrib/gattrib.c b/attrib/gattrib.c index ce7f7b3cc..a04a0ee49 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) |