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/01/26 05:44:38 UTC

incubator-mynewt-larva git commit: bleshell - Don't overwrite channel map.

Repository: incubator-mynewt-larva
Updated Branches:
  refs/heads/master 6132451df -> 088ede8da


bleshell - Don't overwrite channel map.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/088ede8d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/088ede8d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/088ede8d

Branch: refs/heads/master
Commit: 088ede8dae0046213dec38d6483b884503469ede
Parents: 6132451
Author: Christopher Collins <cc...@gmail.com>
Authored: Mon Jan 25 23:41:31 2016 -0500
Committer: Christopher Collins <cc...@gmail.com>
Committed: Mon Jan 25 23:44:10 2016 -0500

----------------------------------------------------------------------
 project/bleshell/src/cmd.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/088ede8d/project/bleshell/src/cmd.c
----------------------------------------------------------------------
diff --git a/project/bleshell/src/cmd.c b/project/bleshell/src/cmd.c
index c1b72ca..ef66a5b 100644
--- a/project/bleshell/src/cmd.c
+++ b/project/bleshell/src/cmd.c
@@ -155,6 +155,7 @@ cmd_adv(int argc, char **argv)
         .adv_filter_policy = BLE_HCI_ADV_FILT_DEF,
     };
     uint8_t peer_addr[6];
+    uint8_t u8;
     int addr_type;
     int conn;
     int disc;
@@ -197,8 +198,10 @@ cmd_adv(int argc, char **argv)
         memset(peer_addr, 0, sizeof peer_addr);
     }
 
-    params.adv_channel_map = parse_arg_long_bounds("chan_map", 0, 0xff, &rc);
-    if (rc != 0 && rc != ENOENT) {
+    u8 = parse_arg_long_bounds("chan_map", 0, 0xff, &rc);
+    if (rc == 0) {
+        params.adv_channel_map = u8;
+    } else if (rc != ENOENT) {
         return rc;
     }