Bring centtest and prphtest projects up to date.

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

Branch: refs/heads/master
Commit: da8f3e03883e693aecc8cc706f8f1afaffc10f6a
Parents: cf46c07
Author: Christopher Collins <ccollins47...@gmail.com>
Authored: Mon Feb 1 19:39:02 2016 -0800
Committer: Christopher Collins <ccollins47...@gmail.com>
Committed: Mon Feb 1 19:41:01 2016 -0800

----------------------------------------------------------------------
 project/centtest/src/main.c | 13 ++++++-------
 project/prphtest/src/main.c | 11 ++++++-----
 2 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/da8f3e03/project/centtest/src/main.c
----------------------------------------------------------------------
diff --git a/project/centtest/src/main.c b/project/centtest/src/main.c
index 4134b19..c4f3372 100755
--- a/project/centtest/src/main.c
+++ b/project/centtest/src/main.c
@@ -187,13 +187,13 @@ centtest_on_connect(int event, int status, struct 
ble_gap_conn_ctxt *ctxt,
     case BLE_GAP_EVENT_CONN:
         console_printf("connection complete; handle=%d status=%d "
                        "peer_addr=%02x:%02x:%02x:%02x:%02x:%02x\n",
-                       ctxt->desc.conn_handle, status,
-                       ctxt->desc.peer_addr[0], ctxt->desc.peer_addr[1],
-                       ctxt->desc.peer_addr[2], ctxt->desc.peer_addr[3],
-                       ctxt->desc.peer_addr[4], ctxt->desc.peer_addr[5]);
+                       ctxt->desc->conn_handle, status,
+                       ctxt->desc->peer_addr[0], ctxt->desc->peer_addr[1],
+                       ctxt->desc->peer_addr[2], ctxt->desc->peer_addr[3],
+                       ctxt->desc->peer_addr[4], ctxt->desc->peer_addr[5]);
 
         if (status == 0) {
-            ble_gattc_disc_all_svcs(ctxt->desc.conn_handle,
+            ble_gattc_disc_all_svcs(ctxt->desc->conn_handle,
                                     centtest_on_disc_s, NULL);
         }
 
@@ -225,9 +225,8 @@ centtest_task_handler(void *arg)
     g_centtest_state = 0;
     g_next_os_time = os_time_get();
     
-    //rc = ble_gap_conn_disc(20000, BLE_GAP_DISC_MODE_GEN);
     rc = ble_gap_conn_initiate(BLE_HCI_ADV_PEER_ADDR_PUBLIC,
-                               centtest_slv_addr,
+                               centtest_slv_addr, NULL,
                                centtest_on_connect, NULL);
     assert(rc == 0);
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/da8f3e03/project/prphtest/src/main.c
----------------------------------------------------------------------
diff --git a/project/prphtest/src/main.c b/project/prphtest/src/main.c
index b66fb6b..8a8dd1a 100755
--- a/project/prphtest/src/main.c
+++ b/project/prphtest/src/main.c
@@ -30,6 +30,7 @@
 #include "host/ble_att.h"
 #include "host/ble_gap.h"
 #include "host/ble_gatt.h"
+#include "host/ble_hs_adv.h"
 #include "controller/ble_ll.h"
 
 /* Init all tasks */
@@ -203,10 +204,10 @@ prphtest_on_connect(int event, int status, struct 
ble_gap_conn_ctxt *ctxt,
     case BLE_GAP_EVENT_CONN:
         console_printf("connection event; handle=%d status=%d "
                        "peer_addr=%02x:%02x:%02x:%02x:%02x:%02x\n",
-                       ctxt->desc.conn_handle, status,
-                       ctxt->desc.peer_addr[0], ctxt->desc.peer_addr[1],
-                       ctxt->desc.peer_addr[2], ctxt->desc.peer_addr[3],
-                       ctxt->desc.peer_addr[4], ctxt->desc.peer_addr[5]);
+                       ctxt->desc->conn_handle, status,
+                       ctxt->desc->peer_addr[0], ctxt->desc->peer_addr[1],
+                       ctxt->desc->peer_addr[2], ctxt->desc->peer_addr[3],
+                       ctxt->desc->peer_addr[4], ctxt->desc->peer_addr[5]);
         break;
 
     default:
@@ -258,7 +259,7 @@ prphtest_task_handler(void *arg)
     assert(rc == 0);
 
     rc = ble_gap_conn_adv_start(BLE_GAP_DISC_MODE_GEN, BLE_GAP_CONN_MODE_UND,
-                                NULL, 0, prphtest_on_connect, NULL);
+                                NULL, 0, NULL, prphtest_on_connect, NULL);
     assert(rc == 0);
 
     while (1) {

Reply via email to