Skip to content
Commit de0b5357 authored by Lyle Zhu's avatar Lyle Zhu Committed by Benjamin Cabé
Browse files

Bluetooth: SDP: Fix ssa discovery issue caused by setting range



If the range of the service search attribute request is set and the
start of the range is not 0x0000, the response data of the request is
not valid. It is caused by the data element sequence has not be added
to response data. The client cannot parse the response data properly.

The root cause of this issue is that the total length of service
record will be added only when adding the first attribute of service
record.

Fix the issue by reset the `state.last_att` and `state.last_att_index`
if the index of current record is not same with `state.current_svc`.

And do not update `state.last_att`, `state.last_att_index`, and
`state.current_svc` in the function `select_attrs()`.

Signed-off-by: default avatarLyle Zhu <lyle.zhu@nxp.com>
parent bb159e9d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment