diff options
author | Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com> | 2015-05-14 09:47:10 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2015-05-19 16:33:35 +0200 |
commit | c895e5ae5b40bdad2333eb4e025f9d7f8f87902c (patch) | |
tree | 69197681efa189d2295bead365be3928a1ed6b99 /android/pan.c | |
parent | 90012afd113b0411b9a79dbd41dee4bde008d6fc (diff) | |
download | bluez-c895e5ae5b40bdad2333eb4e025f9d7f8f87902c.tar.gz |
profiles/network: Add support for handling extension hdr in ctrl msg
Support for extension headers is mandatory functionality. This patch
add support to it and leave responsibility for processing extension
header and sending setup success response to kernel.
This patch is necessary to pass PTS bnep test TC_CTRL_BV_19_C.
Diffstat (limited to 'android/pan.c')
-rw-r--r-- | android/pan.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/android/pan.c b/android/pan.c index 6c9815b18..0bb576e9f 100644 --- a/android/pan.c +++ b/android/pan.c @@ -471,8 +471,11 @@ static gboolean nap_setup_cb(GIOChannel *chan, GIOCondition cond, sk = g_io_channel_unix_get_fd(chan); - /* Reading BNEP_SETUP_CONNECTION_REQUEST_MSG */ - n = read(sk, packet, sizeof(packet)); + /* + * BNEP_SETUP_CONNECTION_REQUEST_MSG should be read and left in case + * of kernel setup connection msg handling. + */ + n = recv(sk, packet, sizeof(packet), MSG_PEEK); if (n < 0) { error("read(): %s(%d)", strerror(errno), errno); goto failed; |