From b3c550b13ba326e62e1e7ad4984e831708da18ef Mon Sep 17 00:00:00 2001 From: Roshan Bangar Date: Tue, 12 Mar 2024 16:07:19 +0530 Subject: [PATCH] Fixed the compilation issue due to redeclaration after disabling ble_sm_feature --- nimble/host/src/ble_gatts.c | 3 ++- nimble/host/src/ble_sm_priv.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nimble/host/src/ble_gatts.c b/nimble/host/src/ble_gatts.c index 01c944d61..bec30c4e2 100644 --- a/nimble/host/src/ble_gatts.c +++ b/nimble/host/src/ble_gatts.c @@ -589,8 +589,9 @@ ble_gatts_calculate_hash(uint8_t *out_hash_key) int size; int rc; uint8_t *buf; - uint8_t key[16] = {0}; + uint8_t key[16]; + memset(key, 0, sizeof(key)); /* data with all zeroes */ rc = ble_att_get_database_size(&size); if(rc != 0) { diff --git a/nimble/host/src/ble_sm_priv.h b/nimble/host/src/ble_sm_priv.h index 359fdf51e..94b57be5d 100644 --- a/nimble/host/src/ble_sm_priv.h +++ b/nimble/host/src/ble_sm_priv.h @@ -433,7 +433,6 @@ int ble_sm_init(void); struct ble_l2cap_chan *ble_sm_create_chan(uint16_t handle); void *ble_sm_cmd_get(uint8_t opcode, size_t len, struct os_mbuf **txom); int ble_sm_tx(uint16_t conn_handle, struct os_mbuf *txom); -int ble_sm_alg_aes_cmac(const uint8_t *key, const uint8_t *in, size_t len, uint8_t *out); #ifdef __cplusplus