You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2024/03/21 07:52:50 UTC
(mynewt-nimble) 02/07: nimble/hs: Make ble_eatt_start static and void
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 826682d3ce20224830f22e75e1fb4bb0fa1ca4fc
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Tue Mar 12 14:20:27 2024 +0100
nimble/hs: Make ble_eatt_start static and void
It is not used outside of ble_eatt.c
---
nimble/host/src/ble_eatt.c | 10 ++++------
nimble/host/src/ble_eatt_priv.h | 7 -------
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/nimble/host/src/ble_eatt.c b/nimble/host/src/ble_eatt.c
index f9f7d924f..9fad2a862 100644
--- a/nimble/host/src/ble_eatt.c
+++ b/nimble/host/src/ble_eatt.c
@@ -76,6 +76,7 @@ static struct ble_npl_event g_read_sup_cl_feat_ev;
static struct ble_npl_event g_read_sup_srv_feat_ev;
static void ble_eatt_setup_cb(struct ble_npl_event *ev);
+static void ble_eatt_start(uint16_t conn_handle);
static struct ble_eatt *
ble_eatt_find_not_busy(uint16_t conn_handle)
@@ -520,7 +521,7 @@ error:
return rc;
}
-int
+static void
ble_eatt_start(uint16_t conn_handle)
{
struct ble_gap_conn_desc desc;
@@ -533,21 +534,18 @@ ble_eatt_start(uint16_t conn_handle)
/* Let master to create ecoc.
* TODO: Slave could setup after some timeout
*/
- return 0;
+ return;
}
eatt = ble_eatt_alloc();
if (!eatt) {
- BLE_EATT_LOG_ERROR("eatt: no available eatt resources\n");
- return 0;
+ return;
}
eatt->conn_handle = conn_handle;
/* Setup EATT */
ble_npl_eventq_put(ble_hs_evq_get(), &eatt->setup_ev);
-
- return 0;
}
void
diff --git a/nimble/host/src/ble_eatt_priv.h b/nimble/host/src/ble_eatt_priv.h
index d5d01bd0e..d3c987767 100644
--- a/nimble/host/src/ble_eatt_priv.h
+++ b/nimble/host/src/ble_eatt_priv.h
@@ -36,7 +36,6 @@ void ble_eatt_init(ble_eatt_att_rx_fn att_rx_fn);
uint16_t ble_eatt_get_available_chan_cid(uint16_t conn_handle, uint8_t op);
void ble_eatt_release_chan(uint16_t conn_handle, uint8_t op);
int ble_eatt_tx(uint16_t conn_handle, uint16_t cid, struct os_mbuf *txom);
-int ble_eatt_start(uint16_t conn_handle);
#else
static inline void
ble_eatt_init(ble_eatt_att_rx_fn att_rx_fn)
@@ -54,11 +53,5 @@ ble_eatt_get_available_chan_cid(uint16_t conn_handle, uint8_t op)
{
return BLE_L2CAP_CID_ATT;
}
-
-static inline int
-ble_eatt_start(uint16_t conn_handle)
-{
- return 0;
-}
#endif
#endif