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/07/08 21:20:30 UTC

[43/50] [abbrv] incubator-mynewt-core git commit: BLE Host - Fix read-rssi bug.

BLE Host - Fix read-rssi bug.

The host was passing a too-short buffer to the HCI tx function.  The
result was a BLE_HS_EMSGSIZE error.

Fix: pass correct buffer size (3) rather than 1.


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

Branch: refs/heads/master
Commit: 2e643fd2515d163b8343b8b72e7b2daea5f55f69
Parents: bcfe3fd
Author: Christopher Collins <cc...@apache.org>
Authored: Sat Jul 2 19:28:41 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Sat Jul 2 19:28:41 2016 -0700

----------------------------------------------------------------------
 net/nimble/host/src/ble_hci_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/2e643fd2/net/nimble/host/src/ble_hci_util.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hci_util.c b/net/nimble/host/src/ble_hci_util.c
index c792b6e..f9ed2c5 100644
--- a/net/nimble/host/src/ble_hci_util.c
+++ b/net/nimble/host/src/ble_hci_util.c
@@ -87,7 +87,7 @@ ble_hci_util_read_rssi(uint16_t conn_handle, int8_t *out_rssi)
     int rc;
 
     host_hci_cmd_build_read_rssi(conn_handle, buf, sizeof buf);
-    rc = ble_hci_cmd_tx(buf, params, 1, &params_len);
+    rc = ble_hci_cmd_tx(buf, params, sizeof params, &params_len);
     if (rc != 0) {
         return rc;
     }