sdp_client.c (18e1cd232fec87c75eb7b156bfa313ec5f4e3257) sdp_client.c (166d44a10c473c784f430ccec304850b129f7bdd)
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 334 unchanged lines hidden (view full) ---

343 little_endian_store_16(event, 4, sdp_parser_record_counter);
344 little_endian_store_32(event, 6, sdp_client_record_handle);
345 (*sdp_parser_callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
346 }
347}
348#endif
349
350static void sdp_client_notify_callbacks(void){
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 334 unchanged lines hidden (view full) ---

343 little_endian_store_16(event, 4, sdp_parser_record_counter);
344 little_endian_store_32(event, 6, sdp_client_record_handle);
345 (*sdp_parser_callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
346 }
347}
348#endif
349
350static void sdp_client_notify_callbacks(void){
351 if (sdp_client_ready() == false) {
352 return;
351 while (sdp_client_ready()) {
352 btstack_context_callback_registration_t *callback = (btstack_context_callback_registration_t *) btstack_linked_list_pop(&sdp_client_query_requests);
353 if (callback != NULL) {
354 (*callback->callback)(callback->context);
355 } else {
356 return;
357 }
353 }
358 }
354 btstack_context_callback_registration_t * callback = (btstack_context_callback_registration_t*) btstack_linked_list_pop(&sdp_client_query_requests);
355 if (callback == NULL) {
356 return;
357 }
358 (*callback->callback)(callback->context);
359}
360
361void sdp_parser_handle_done(uint8_t status){
362 // reset state
363 sdp_client_state = INIT;
364
365 // emit query complete event
366 uint8_t event[3];

--- 433 unchanged lines hidden ---
359}
360
361void sdp_parser_handle_done(uint8_t status){
362 // reset state
363 sdp_client_state = INIT;
364
365 // emit query complete event
366 uint8_t event[3];

--- 433 unchanged lines hidden ---