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/12/21 23:29:37 UTC

[2/5] incubator-mynewt-core git commit: bletiny: fix passing correct handle to gattc disc all dscs

bletiny: fix passing correct handle to gattc disc all dscs

When passing start handle, the search starts from handle+1,
because ble_gattc_disc_all_dscs uses chr_val as first parameter.
So we assume that chr_val=handle-1.

With this patch it is possible to pass TC_GAD_CL_BV_06_C.


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

Branch: refs/heads/develop
Commit: 5ffe8db884649240f4e9c38ac3eb8f7d365d65fc
Parents: 7dee316
Author: Micha\u0142 Narajowski <mi...@codecoup.pl>
Authored: Mon Dec 19 14:10:07 2016 +0100
Committer: Micha\u0142 Narajowski <mi...@codecoup.pl>
Committed: Tue Dec 20 09:40:10 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5ffe8db8/apps/bletiny/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/main.c b/apps/bletiny/src/main.c
index 97b04d0..8234ace 100755
--- a/apps/bletiny/src/main.c
+++ b/apps/bletiny/src/main.c
@@ -1166,12 +1166,12 @@ bletiny_disc_svc_by_uuid(uint16_t conn_handle, uint8_t *uuid128)
 }
 
 int
-bletiny_disc_all_dscs(uint16_t conn_handle, uint16_t chr_def_handle,
-                      uint16_t chr_end_handle)
+bletiny_disc_all_dscs(uint16_t conn_handle, uint16_t start_handle,
+                      uint16_t end_handle)
 {
     int rc;
 
-    rc = ble_gattc_disc_all_dscs(conn_handle, chr_def_handle, chr_end_handle,
+    rc = ble_gattc_disc_all_dscs(conn_handle, start_handle - 1, end_handle,
                                  bletiny_on_disc_d, NULL);
     return rc;
 }