mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-31 10:20:58 +00:00
provide sdp_query_rfcomm_deeregister(), and call it on client disconnect in daemon. fixes issue #399
This commit is contained in:
parent
baf94f0687
commit
e13f76e01a
@ -754,6 +754,7 @@ static int daemon_client_handler(connection_t *connection, uint16_t packet_type,
|
||||
// NOTE: experimental - disconnect all LE connections where GATT Client was used
|
||||
gatt_client_disconnect_connection(connection);
|
||||
#endif
|
||||
sdp_query_rfcomm_deregister_callback();
|
||||
// no clients -> no HCI connections
|
||||
if (!clients){
|
||||
hci_disconnect_all();
|
||||
|
@ -292,4 +292,8 @@ void sdp_query_rfcomm_channel_and_name_for_uuid(bd_addr_t remote, uint16_t uuid)
|
||||
sdp_query_rfcomm_channel_and_name_for_search_pattern(remote, (uint8_t*)des_serviceSearchPattern);
|
||||
}
|
||||
|
||||
|
||||
void sdp_query_rfcomm_deregister_callback(){
|
||||
sdp_query_rfcomm_init();
|
||||
sdp_app_callback = dummy_notify_app;
|
||||
sdp_app_context = NULL;
|
||||
}
|
||||
|
@ -64,8 +64,6 @@ typedef struct sdp_query_rfcomm_service_event {
|
||||
} sdp_query_rfcomm_service_event_t;
|
||||
|
||||
|
||||
void sdp_query_rfcomm_init(void);
|
||||
|
||||
// Searches SDP records on a remote device for RFCOMM services with
|
||||
// a given UUID.
|
||||
void sdp_query_rfcomm_channel_and_name_for_uuid(bd_addr_t remote, uint16_t uuid);
|
||||
@ -77,6 +75,8 @@ void sdp_query_rfcomm_channel_and_name_for_search_pattern(bd_addr_t remote, uint
|
||||
// Registers a callback to receive RFCOMM service and query complete event.
|
||||
void sdp_query_rfcomm_register_callback(void(*sdp_app_callback)(sdp_query_event_t * event, void * context), void * context);
|
||||
|
||||
void sdp_query_rfcomm_deregister_callback();
|
||||
|
||||
#if defined __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user