You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/06/18 10:55:40 UTC

[GitHub] andrzej-kaczmarek closed pull request #132: nimble/transport: Fix socket transport build on native tgt

andrzej-kaczmarek closed pull request #132: nimble/transport: Fix socket transport build on native tgt
URL: https://github.com/apache/mynewt-nimble/pull/132
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/nimble/transport/socket/src/ble_hci_socket.c b/nimble/transport/socket/src/ble_hci_socket.c
index 58827825..296d0e91 100644
--- a/nimble/transport/socket/src/ble_hci_socket.c
+++ b/nimble/transport/socket/src/ble_hci_socket.c
@@ -81,6 +81,7 @@ struct sockaddr_hci {
 #include "nimble/ble.h"
 #include "nimble/nimble_opt.h"
 #include "nimble/hci_common.h"
+#include "nimble/nimble_npl.h"
 #include "nimble/ble_hci_trans.h"
 #include "socket/ble_hci_socket.h"
 
@@ -767,8 +768,11 @@ ble_hci_trans_reset(void)
 void
 ble_hci_sock_ack_handler(void *arg)
 {
+    struct ble_npl_event *ev;
+
     while (1) {
-        ble_npl_eventq_run(&ble_hci_sock_state.evq);
+        ev = ble_npl_eventq_get(&ble_hci_sock_state.evq, BLE_NPL_TIME_FOREVER);
+        ble_npl_event_run(ev);
     }
 }
 
@@ -787,7 +791,7 @@ ble_hci_sock_init_task(void)
         pstack = malloc(sizeof(os_stack_t)*BLE_SOCK_STACK_SIZE);
         assert(pstack);
         os_task_init(&ble_sock_task, "hci_sock", ble_hci_sock_ack_handler, NULL,
-                     MYNEWT_VAL(BLE_SOCK_TASK_PRIO), BLE_NPL_WAIT_FOREVER, pstack,
+                     MYNEWT_VAL(BLE_SOCK_TASK_PRIO), BLE_NPL_TIME_FOREVER, pstack,
                      BLE_SOCK_STACK_SIZE);
     }
 #else
@@ -818,7 +822,7 @@ ble_hci_sock_init(void)
     ble_hci_sock_state.sock = -1;
 
     ble_hci_sock_init_task();
-    ble_hci_sock_state.ev.ev_cb = ble_hci_sock_rx_ev;
+    ble_npl_event_init(&ble_hci_sock_state.ev, ble_hci_sock_rx_ev, NULL);
 
     rc = os_mempool_init(&ble_hci_sock_acl_pool,
                          MYNEWT_VAL(BLE_ACL_BUF_COUNT),


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services