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 2019/06/06 09:05:00 UTC
[mynewt-nimble] branch master updated: btshell: Fix bogus error
message on connect
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
The following commit(s) were added to refs/heads/master by this push:
new a4af93c btshell: Fix bogus error message on connect
a4af93c is described below
commit a4af93c1a11a6f2214507e43b21ecfdb24ab42f2
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Wed Jun 5 15:28:34 2019 +0200
btshell: Fix bogus error message on connect
---
apps/btshell/src/cmd.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/apps/btshell/src/cmd.c b/apps/btshell/src/cmd.c
index 8cbcc57..b631564 100644
--- a/apps/btshell/src/cmd.c
+++ b/apps/btshell/src/cmd.c
@@ -823,7 +823,9 @@ cmd_connect(int argc, char **argv)
if (ext == 0x00) {
rc = btshell_conn_initiate(own_addr_type, peer_addr_param, duration_ms,
&phy_1M_params);
- console_printf("error connecting; rc=%d\n", rc);
+ if (rc) {
+ console_printf("error connecting; rc=%d\n", rc);
+ }
return rc;
}
@@ -831,7 +833,9 @@ cmd_connect(int argc, char **argv)
rc = btshell_ext_conn_initiate(own_addr_type, peer_addr_param,
duration_ms, &phy_1M_params,
NULL, NULL);
- console_printf("error connecting; rc=%d\n", rc);
+ if (rc) {
+ console_printf("error connecting; rc=%d\n", rc);
+ }
return rc;
}