Bluetooth: GATT: Allocate request from a memory slab
This should reduce the footprint on applications that do a lot of requests i.e have a lot of subscriptions. Fixes #21103 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
f256625ad4
commit
d278cdc3d7
6 changed files with 73 additions and 42 deletions
|
@ -43,23 +43,6 @@ extern "C" {
|
|||
#define BT_ATT_ERR_PROCEDURE_IN_PROGRESS 0xfe
|
||||
#define BT_ATT_ERR_OUT_OF_RANGE 0xff
|
||||
|
||||
typedef void (*bt_att_func_t)(struct bt_conn *conn, u8_t err,
|
||||
const void *pdu, u16_t length,
|
||||
void *user_data);
|
||||
typedef void (*bt_att_destroy_t)(void *user_data);
|
||||
|
||||
/* ATT request context */
|
||||
struct bt_att_req {
|
||||
sys_snode_t node;
|
||||
bt_att_func_t func;
|
||||
bt_att_destroy_t destroy;
|
||||
struct net_buf_simple_state state;
|
||||
struct net_buf *buf;
|
||||
#if defined(CONFIG_BT_SMP)
|
||||
bool retrying;
|
||||
#endif /* CONFIG_BT_SMP */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue