mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 13:20:39 +00:00
fix sdp_record_matches_service_search_pattern
This commit is contained in:
parent
ba3a63451c
commit
0993bebf69
@ -190,12 +190,15 @@ int sdp_handle_service_search_attribute_request(uint8_t * packet){
|
||||
de_create_sequence(attributeLists);
|
||||
|
||||
// dump
|
||||
de_dump_data_element(serviceSearchPattern);
|
||||
// printf("ServiceSearchPattern:\n");
|
||||
// de_dump_data_element(serviceSearchPattern);
|
||||
|
||||
// for all service records that match
|
||||
linked_item_t *it;
|
||||
for (it = (linked_item_t *) sdp_service_records; it ; it = it->next){
|
||||
service_record_item_t * item = (service_record_item_t *) it;
|
||||
// printf("ServiceRecord:\n");
|
||||
// de_dump_data_element(item->service_record);
|
||||
if (sdp_record_matches_service_search_pattern(item->service_record, serviceSearchPattern)){
|
||||
// copy specified attributes
|
||||
uint8_t * attributes = de_push_sequence(attributeLists);
|
||||
|
@ -379,7 +379,7 @@ int sdp_record_matches_service_search_pattern(uint8_t *record, uint8_t *serviceS
|
||||
struct sdp_context_match_pattern context;
|
||||
context.record = record;
|
||||
context.result = 1;
|
||||
de_traverse_sequence(record, sdp_traversal_match_pattern, &context);
|
||||
de_traverse_sequence(serviceSearchPattern, sdp_traversal_match_pattern, &context);
|
||||
return context.result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user