Skip to content

Commit aca9345

Browse files
lylezhu2012kartben
authored andcommitted
Bluetooth: Classic: SDP: Refactor parsing of Service Search Pattern
In current implementation, after parsing the received service search pattern and all matched SDP records are saved in the local variable `matching_recs`. The max count of SDP records within its SDP database that match the given service search pattern is BT_SDP_MAX_SERVICES when parsing the received Service Search Pattern. And it causes the max count registered SDP records is limited to BT_SDP_MAX_SERVICES. Refactor the parsing of service search pattern to remove the limitation with the following steps. 1. Save the service search pattern to a simple buffer by calling the function `parse_service_search_pattern()`. 2. Traverse all registered SDP record and check for each SDP record if it is matched with given service search pattern by calling function `service_search_pattern_matched()`. 3. Use the matched SDP records to response the SDP request. And also remove the limitation of the max count of registered SDP records. Signed-off-by: Lyle Zhu <[email protected]>
1 parent cbf7576 commit aca9345

File tree

2 files changed

+162
-149
lines changed

2 files changed

+162
-149
lines changed

0 commit comments

Comments
 (0)