You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/06/05 11:52:18 UTC

[31/43] incubator-mynewt-core git commit: BLE Host - Remove extraneous log message

BLE Host - Remove extraneous log message


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/0f774257
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/0f774257
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/0f774257

Branch: refs/heads/develop
Commit: 0f774257417efd04cc1786498dfec28cd3c9a16e
Parents: f03daf5
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Jun 2 19:28:24 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Sun Jun 5 19:17:08 2016 +0800

----------------------------------------------------------------------
 net/nimble/host/src/ble_gap.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0f774257/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 3d40c02..abf4401 100644
--- a/net/nimble/host/src/ble_gap.c
+++ b/net/nimble/host/src/ble_gap.c
@@ -1311,10 +1311,6 @@ ble_gap_adv_params_tx(const struct ble_gap_adv_params *adv_params,
             sizeof(hci_adv_params.peer_addr));
     }
 
-    BLE_HS_LOG(INFO, "GAP procedure initiated: advertise; ");
-    ble_gap_log_adv(adv_params, peer, peer_addr_type);
-    BLE_HS_LOG(INFO, "\n");
-
     rc = host_hci_cmd_build_le_set_adv_params(&hci_adv_params, buf, sizeof buf);
     if (rc != 0) {
         return rc;
@@ -1418,10 +1414,6 @@ ble_gap_adv_start(uint8_t discoverable_mode, uint8_t connectable_mode,
         goto done;
     }
 
-    BLE_HS_LOG(INFO, "GAP procedure initiated: advertise; ");
-    ble_gap_log_adv(&gap_adv_params, peer_addr, peer_addr_type);
-    BLE_HS_LOG(INFO, "\n");
-
     ble_gap_slave.cb = cb;
     ble_gap_slave.cb_arg = cb_arg;
     ble_gap_slave.conn_mode = connectable_mode;
@@ -1433,7 +1425,7 @@ ble_gap_adv_start(uint8_t discoverable_mode, uint8_t connectable_mode,
                       &gap_adv_params.adv_itvl_max);
 
     /* set a new private address for random advertisements */
-    if(gap_adv_params.own_addr_type == BLE_HCI_ADV_OWN_ADDR_RANDOM) {
+    if (gap_adv_params.own_addr_type == BLE_HCI_ADV_OWN_ADDR_RANDOM) {
         ble_hs_priv_set_nrpa();
     }
 
@@ -1455,6 +1447,10 @@ ble_gap_adv_start(uint8_t discoverable_mode, uint8_t connectable_mode,
         break;
     }
 
+    BLE_HS_LOG(INFO, "GAP procedure initiated: advertise; ");
+    ble_gap_log_adv(&gap_adv_params, peer_addr, peer_addr_type);
+    BLE_HS_LOG(INFO, "\n");
+
     rc = ble_gap_adv_params_tx(&gap_adv_params, peer_addr, peer_addr_type);
     if (rc != 0) {
         goto done;