sdp_client: iterate over registered SDP query callbacks

This commit is contained in:
Matthias Ringwald 2024-11-06 10:43:01 +01:00
parent 89f10e1d72
commit 166d44a10c
2 changed files with 8 additions and 7 deletions

View File

@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- GAP: return command disallowed if disconnect already requested
- GAP: improve handling of incorrectly resolved addresses in HCI_SUBEVENT_LE_CONNECTION_COMPLETE
- GAP: only store link key if at least one side requests bonding during the IO Capabilities exchange.
- SDP Client: trigger next SDP query callback, if registered callback does not start SDP query
- GOEP Client: remove goep_client_create_connection. Use goep_client_connect instead.
- HID Parser: cleanup of function names and signatures
- HIDS Client: use error code instead of att status in conencted event

View File

@ -348,14 +348,14 @@ void sdp_parser_handle_service_search(uint8_t * data, uint16_t total_count, uint
#endif
static void sdp_client_notify_callbacks(void){
if (sdp_client_ready() == false) {
return;
while (sdp_client_ready()) {
btstack_context_callback_registration_t *callback = (btstack_context_callback_registration_t *) btstack_linked_list_pop(&sdp_client_query_requests);
if (callback != NULL) {
(*callback->callback)(callback->context);
} else {
return;
}
}
btstack_context_callback_registration_t * callback = (btstack_context_callback_registration_t*) btstack_linked_list_pop(&sdp_client_query_requests);
if (callback == NULL) {
return;
}
(*callback->callback)(callback->context);
}
void sdp_parser_handle_done(uint8_t status){