You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/01/08 03:56:41 UTC

[3/3] incubator-mynewt-larva git commit: Reserve connection handle 0xffff for internal tx.

Reserve connection handle 0xffff for internal tx.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/7587a373
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/7587a373
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/7587a373

Branch: refs/heads/master
Commit: 7587a3735bddd556905629ef720d3627caa5a564
Parents: d05dcac
Author: Christopher Collins <cc...@gmail.com>
Authored: Thu Jan 7 18:54:23 2016 -0800
Committer: Christopher Collins <cc...@gmail.com>
Committed: Thu Jan 7 18:56:11 2016 -0800

----------------------------------------------------------------------
 net/nimble/host/include/host/ble_hs.h | 2 ++
 net/nimble/host/src/ble_att_svr.c     | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/7587a373/net/nimble/host/include/host/ble_hs.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_hs.h b/net/nimble/host/include/host/ble_hs.h
index 8781d19..036913e 100644
--- a/net/nimble/host/include/host/ble_hs.h
+++ b/net/nimble/host/include/host/ble_hs.h
@@ -20,6 +20,8 @@
 #include <inttypes.h>
 #include "host/ble_att.h"
 
+#define BLE_HS_CONN_HANDLE_NONE         0xffff
+
 #define BLE_HS_EAGAIN                   1
 #define BLE_HS_EALREADY                 2
 #define BLE_HS_EINVAL                   3

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/7587a373/net/nimble/host/src/ble_att_svr.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_att_svr.c b/net/nimble/host/src/ble_att_svr.c
index ef9a338..9e12022 100644
--- a/net/nimble/host/src/ble_att_svr.c
+++ b/net/nimble/host/src/ble_att_svr.c
@@ -331,7 +331,7 @@ ble_att_svr_read(struct ble_hs_conn *conn, struct ble_att_svr_entry *entry,
     int rc;
 
     if (conn == NULL) {
-        conn_handle = 0xffff; /* XXX */
+        conn_handle = BLE_HS_CONN_HANDLE_NONE;
     } else {
         conn_handle = conn->bhc_handle;
 
@@ -403,7 +403,7 @@ ble_att_svr_write(struct ble_hs_conn *conn, struct ble_att_svr_entry *entry,
     /* XXX: Check security. */
 
     if (conn == NULL) {
-        conn_handle = 0xffff; /* XXX */
+        conn_handle = BLE_HS_CONN_HANDLE_NONE;
     } else {
         conn_handle = conn->bhc_handle;
     }