att_server: add flags to att_service_handler_t

This commit is contained in:
Matthias Ringwald 2024-01-23 14:08:41 +01:00
parent f76e733a84
commit 85878f9d1f
2 changed files with 5 additions and 2 deletions

View File

@ -166,11 +166,12 @@ typedef int (*att_write_callback_t)(hci_con_handle_t con_handle, uint16_t attrib
// Read & Write Callbacks for handle range
typedef struct att_service_handler {
btstack_linked_item_t * item;
uint16_t start_handle;
uint16_t end_handle;
att_read_callback_t read_callback;
att_write_callback_t write_callback;
btstack_packet_handler_t packet_handler;
uint16_t start_handle;
uint16_t end_handle;
uint8_t flags;
} att_service_handler_t;
// MARK: ATT Operations

View File

@ -1263,6 +1263,8 @@ void att_server_register_service_handler(att_service_handler_t * handler){
log_error("handler for range 0x%04x-0x%04x already registered", handler->start_handle, handler->end_handle);
return;
}
handler->flags = 0;
btstack_linked_list_add(&service_handlers, (btstack_linked_item_t*) handler);
}