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:19 UTC

[24/50] incubator-mynewt-core git commit: bletiny: Add error print when L2CAP LE CoC disconnect fails

bletiny: Add error print when L2CAP LE CoC disconnect fails


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

Branch: refs/heads/1_0_0_dev
Commit: 07b86ffe1cdea5cc8474d9c8f4e4f9c6294a02af
Parents: 0aef480
Author: \u0141ukasz Rymanowski <lu...@codecoup.pl>
Authored: Wed Mar 1 11:16:15 2017 +0100
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Mar 6 15:50:54 2017 -0800

----------------------------------------------------------------------
 apps/bletiny/src/main.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/07b86ffe/apps/bletiny/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/main.c b/apps/bletiny/src/main.c
index 442a264..c0177c0 100755
--- a/apps/bletiny/src/main.c
+++ b/apps/bletiny/src/main.c
@@ -1740,6 +1740,7 @@ bletiny_l2cap_disconnect(uint16_t conn_handle, uint16_t idx)
     struct bletiny_conn *conn;
     struct bletiny_l2cap_coc *coc;
     int i;
+    int rc = 0;
 
     conn = bletiny_conn_find(conn_handle);
     assert(conn != NULL);
@@ -1753,9 +1754,12 @@ bletiny_l2cap_disconnect(uint16_t conn_handle, uint16_t idx)
     }
     assert(coc != NULL);
 
-    ble_l2cap_disconnect(coc->chan);
+    rc = ble_l2cap_disconnect(coc->chan);
+    if (rc) {
+        console_printf("Could not disconnect channel rc=%d\n", rc);
+    }
 
-    return 0;
+    return rc;
 #endif
 }