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/10/18 08:55:00 UTC
[mynewt-nimble] 01/03: apps/btshell: Fix not reporting scan start
error
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 71d85ca9fe98111d1782ab1bb0db2db08a5ff521
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Wed Oct 16 11:55:06 2019 +0200
apps/btshell: Fix not reporting scan start error
Extended parameter cannot be invalid as this is verified by parsing
function so just print error in common exit path.
---
apps/btshell/src/cmd.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/apps/btshell/src/cmd.c b/apps/btshell/src/cmd.c
index 317c530..45ead7e 100644
--- a/apps/btshell/src/cmd.c
+++ b/apps/btshell/src/cmd.c
@@ -1310,11 +1310,14 @@ cmd_scan(int argc, char **argv)
&g_scan_opts);
break;
default:
- rc = -1;
- console_printf("invalid 'extended' parameter\n");
+ assert(0);
break;
}
+ if (rc != 0) {
+ console_printf("error scanning; rc=%d\n", rc);
+ }
+
return rc;
}