fix sdp_record_matches_service_search_pattern

This commit is contained in:
matthias.ringwald 2010-06-12 14:32:42 +00:00
parent ba3a63451c
commit 0993bebf69
2 changed files with 5 additions and 2 deletions

View File

@ -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);

View File

@ -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;
}