You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2017/03/30 21:12:26 UTC
[09/37] incubator-mynewt-core git commit: BLE Host - Rename parameter
for clarity
BLE Host - Rename parameter for clarity
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/03650bca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/03650bca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/03650bca
Branch: refs/heads/nrf_cputime
Commit: 03650bcaf55c9d0fec4178f69635b6f7553ae6ac
Parents: 7f690f7
Author: Christopher Collins <cc...@apache.org>
Authored: Fri Mar 17 15:24:50 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 16:48:26 2017 -0700
----------------------------------------------------------------------
net/nimble/host/include/host/ble_gap.h | 2 +-
net/nimble/host/src/ble_gap.c | 15 ++++++++-------
2 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/03650bca/net/nimble/host/include/host/ble_gap.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_gap.h b/net/nimble/host/include/host/ble_gap.h
index 1c0c93e..189244a 100644
--- a/net/nimble/host/include/host/ble_gap.h
+++ b/net/nimble/host/include/host/ble_gap.h
@@ -556,7 +556,7 @@ int ble_gap_connect(uint8_t own_addr_type, const ble_addr_t *peer_addr,
int ble_gap_conn_cancel(void);
int ble_gap_conn_active(void);
int ble_gap_terminate(uint16_t conn_handle, uint8_t hci_reason);
-int ble_gap_wl_set(const ble_addr_t *addr, uint8_t white_list_count);
+int ble_gap_wl_set(const ble_addr_t *addrs, uint8_t white_list_count);
int ble_gap_update_params(uint16_t conn_handle,
const struct ble_gap_upd_params *params);
int ble_gap_dbg_update_active(uint16_t conn_handle);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/03650bca/net/nimble/host/src/ble_gap.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_gap.c b/net/nimble/host/src/ble_gap.c
index d14c55c..ed71374 100644
--- a/net/nimble/host/src/ble_gap.c
+++ b/net/nimble/host/src/ble_gap.c
@@ -1434,13 +1434,13 @@ ble_gap_wl_tx_clear(void)
/**
* Overwrites the controller's white list with the specified contents.
*
- * @param addr The entries to write to the white list.
+ * @param addrs The entries to write to the white list.
* @param white_list_count The number of entries in the white list.
*
* @return 0 on success; nonzero on failure.
*/
int
-ble_gap_wl_set(const ble_addr_t *addr, uint8_t white_list_count)
+ble_gap_wl_set(const ble_addr_t *addrs, uint8_t white_list_count)
{
#if !MYNEWT_VAL(BLE_WHITELIST)
return BLE_HS_ENOTSUP;
@@ -1459,8 +1459,8 @@ ble_gap_wl_set(const ble_addr_t *addr, uint8_t white_list_count)
}
for (i = 0; i < white_list_count; i++) {
- if (addr[i].type != BLE_ADDR_PUBLIC &&
- addr[i].type != BLE_ADDR_RANDOM) {
+ if (addrs[i].type != BLE_ADDR_PUBLIC &&
+ addrs[i].type != BLE_ADDR_RANDOM) {
rc = BLE_HS_EINVAL;
goto done;
@@ -1473,7 +1473,7 @@ ble_gap_wl_set(const ble_addr_t *addr, uint8_t white_list_count)
}
BLE_HS_LOG(INFO, "GAP procedure initiated: set whitelist; ");
- ble_gap_log_wl(addr, white_list_count);
+ ble_gap_log_wl(addrs, white_list_count);
BLE_HS_LOG(INFO, "\n");
rc = ble_gap_wl_tx_clear();
@@ -1482,7 +1482,7 @@ ble_gap_wl_set(const ble_addr_t *addr, uint8_t white_list_count)
}
for (i = 0; i < white_list_count; i++) {
- rc = ble_gap_wl_tx_add(addr + i);
+ rc = ble_gap_wl_tx_add(addrs + i);
if (rc != 0) {
goto done;
}
@@ -2353,7 +2353,8 @@ ble_gap_conn_create_tx(uint8_t own_addr_type, const ble_addr_t *peer_addr,
* already in progress;
* BLE_HS_EBUSY if initiating a connection is not
* possible because scanning is in progress;
- * BLE_HS_EDONE if the specified peer is already connected;
+ * BLE_HS_EDONE if the specified peer is already
+ * connected;
* Other nonzero on error.
*/
int