Bluetooth: SDP: Check SDP error when receiving PDU response

Stops handle data if server responds with SDP Error PDU

Jira: ZEP-1112

Change-Id: Iaddb740f71fa86384753ab32956fc69b89faeea0
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
Arkadiusz Lichwa 2016-12-23 00:50:38 +01:00 committed by Johan Hedberg
commit 4de2bad817

View file

@ -334,6 +334,11 @@ static void sdp_client_receive(struct bt_l2cap_chan *chan, struct net_buf *buf)
return;
}
if (hdr->op_code == BT_SDP_ERROR_RSP) {
BT_INFO("Error SDP PDU response");
return;
}
len = sys_be16_to_cpu(hdr->param_len);
tid = sys_be16_to_cpu(hdr->tid);
net_buf_pull(buf, sizeof(*hdr));