From 0993bebf69e37423553486e3badc3edce9d8bc86 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Sat, 12 Jun 2010 14:32:42 +0000 Subject: [PATCH] fix sdp_record_matches_service_search_pattern --- src/sdp.c | 5 ++++- src/sdp_util.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sdp.c b/src/sdp.c index 7fc8d0da6..6047dc838 100644 --- a/src/sdp.c +++ b/src/sdp.c @@ -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); diff --git a/src/sdp_util.c b/src/sdp_util.c index 420c891d9..c814973c9 100644 --- a/src/sdp_util.c +++ b/src/sdp_util.c @@ -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; }