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/12 01:19:32 UTC

[4/4] incubator-mynewt-larva git commit: Update host projects to accommodate new GATT API.

Update host projects to accommodate new GATT API.


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

Branch: refs/heads/master
Commit: e23ac939319d88f0e47f9bffc8ff1d0cfb28d80b
Parents: 603d9ae
Author: Christopher Collins <cc...@gmail.com>
Authored: Mon Jan 11 16:18:59 2016 -0800
Committer: Christopher Collins <cc...@gmail.com>
Committed: Mon Jan 11 16:18:59 2016 -0800

----------------------------------------------------------------------
 project/centtest/src/main.c | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/e23ac939/project/centtest/src/main.c
----------------------------------------------------------------------
diff --git a/project/centtest/src/main.c b/project/centtest/src/main.c
index c4394dc..cb57c8f 100755
--- a/project/centtest/src/main.c
+++ b/project/centtest/src/main.c
@@ -79,14 +79,15 @@ bletest_inc_adv_pkt_num(void) { }
 
 
 static int
-centtest_on_read(uint16_t conn_handle, int status,
-                     struct ble_gatt_attr *attr, void *arg)
+centtest_on_read(uint16_t conn_handle, struct ble_gatt_error *error,
+                 struct ble_gatt_attr *attr, void *arg)
 {
     uint8_t *u8ptr;
     int i;
 
-    if (status != 0) {
-        console_printf("characteristic read failure: status=%d\n", status);
+    if (error != NULL) {
+        console_printf("characteristic read failure: status=%d\n",
+                       error->status);
         return 0;
     }
 
@@ -104,15 +105,15 @@ centtest_on_read(uint16_t conn_handle, int status,
 }
 
 static int
-centtest_on_disc_c(uint16_t conn_handle, int status,
-                       struct ble_gatt_chr *chr, void *arg)
+centtest_on_disc_c(uint16_t conn_handle, struct ble_gatt_error *error,
+                   struct ble_gatt_chr *chr, void *arg)
 {
     int rc;
     int i;
 
-    if (status != 0) {
+    if (error != NULL) {
         console_printf("characteristic discovery failure: status=%d\n",
-                       status);
+                       error->status);
         return 0;
     }
 
@@ -140,13 +141,14 @@ centtest_on_disc_c(uint16_t conn_handle, int status,
 }
 
 static int
-centtest_on_disc_s(uint16_t conn_handle, int status,
-                       struct ble_gatt_service *service, void *arg)
+centtest_on_disc_s(uint16_t conn_handle, struct ble_gatt_error *error,
+                   struct ble_gatt_service *service, void *arg)
 {
     int i;
 
-    if (status != 0) {
-        console_printf("service discovery failure: status=%d\n", status);
+    if (error != NULL) {
+        console_printf("service discovery failure: status=%d\n",
+                       error->status);
         return 0;
     }