diff --git a/src/classic/sdp_client_rfcomm.c b/src/classic/sdp_client_rfcomm.c index 588aad63c..3d4f27d6f 100644 --- a/src/classic/sdp_client_rfcomm.c +++ b/src/classic/sdp_client_rfcomm.c @@ -305,29 +305,19 @@ void sdp_client_query_rfcomm_init(void){ // Public API uint8_t sdp_client_query_rfcomm_channel_and_name_for_search_pattern(btstack_packet_handler_t callback, bd_addr_t remote, const uint8_t * service_search_pattern){ - if (!sdp_client_ready()) return SDP_QUERY_BUSY; sdp_app_callback = callback; sdp_client_query_rfcomm_init(); - sdp_client_query(&sdp_client_query_rfcomm_handle_sdp_parser_event, remote, service_search_pattern, (uint8_t*)&des_attributeIDList[0]); - return 0; + return sdp_client_query(&sdp_client_query_rfcomm_handle_sdp_parser_event, remote, service_search_pattern, (uint8_t*)&des_attributeIDList[0]); } uint8_t sdp_client_query_rfcomm_channel_and_name_for_uuid(btstack_packet_handler_t callback, bd_addr_t remote, uint16_t uuid16){ - if (!sdp_client_ready()) return SDP_QUERY_BUSY; - - uint8_t * service_search_pattern = sdp_service_search_pattern_for_uuid16(uuid16); - sdp_client_query_rfcomm_channel_and_name_for_search_pattern(callback, remote, service_search_pattern); - return 0; + return sdp_client_query_rfcomm_channel_and_name_for_search_pattern(callback, remote, sdp_service_search_pattern_for_uuid16(uuid16)); } uint8_t sdp_client_query_rfcomm_channel_and_name_for_uuid128(btstack_packet_handler_t callback, bd_addr_t remote, const uint8_t * uuid128){ - if (!sdp_client_ready()) return SDP_QUERY_BUSY; - - uint8_t * service_search_pattern = sdp_service_search_pattern_for_uuid128(uuid128); - sdp_client_query_rfcomm_channel_and_name_for_search_pattern(callback, remote, service_search_pattern); - return 0; + return sdp_client_query_rfcomm_channel_and_name_for_search_pattern(callback, remote, sdp_service_search_pattern_for_uuid128(uuid128)); }