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/06 21:18:38 UTC

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

Branch: refs/heads/master
Commit: b552c1636787546611dd683f6efeddd73377dd4f
Parents: 316c18a
Author: \u0141ukasz Rymanowski <lu...@codecoup.pl>
Authored: Wed Feb 22 17:04:10 2017 +0100
Committer: \u0141ukasz Rymanowski <lu...@codecoup.pl>
Committed: Wed Mar 1 12:10:48 2017 +0100

----------------------------------------------------------------------
 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/b552c163/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);