You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2017/03/07 00:05:15 UTC

[20/50] incubator-mynewt-core git commit: bletiny: Add missing returns in L2CAP connect/disconnect

bletiny: Add missing returns in L2CAP connect/disconnect

Fix missing error returns.


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

Branch: refs/heads/1_0_0_dev
Commit: 143f6f53dd6a1cc44e507214dac8b6b641747572
Parents: 9c7db2d
Author: \u0141ukasz Rymanowski <lu...@codecoup.pl>
Authored: Wed Feb 22 17:04:10 2017 +0100
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Mar 6 15:50:20 2017 -0800

----------------------------------------------------------------------
 apps/bletiny/src/cmd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/143f6f53/apps/bletiny/src/cmd.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/cmd.c b/apps/bletiny/src/cmd.c
index 8904ea2..47ab379 100644
--- a/apps/bletiny/src/cmd.c
+++ b/apps/bletiny/src/cmd.c
@@ -1226,6 +1226,7 @@ cmd_l2cap_connect(int argc, char **argv)
     if (rc != 0) {
         console_printf("invalid 'conn' parameter\n");
         help_cmd_uint16("conn");
+        return rc;
     }
 
     psm = parse_arg_uint16("psm", &rc);
@@ -1265,13 +1266,14 @@ cmd_l2cap_disconnect(int argc, char **argv)
     if (rc != 0) {
         console_printf("invalid 'conn' parameter\n");
         help_cmd_uint16("conn");
+        return rc;
     }
 
     idx = parse_arg_uint16("idx", &rc);
     if (rc != 0) {
         console_printf("invalid 'idx' parameter\n");
         help_cmd_uint16("idx");
-        return 0;
+        return rc;
     }
 
     return bletiny_l2cap_disconnect(conn, idx);