You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2016/05/16 20:31:18 UTC

[1/2] incubator-mynewt-core git commit: Add dependency for nffs to bletest

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 2dd32b7df -> 4d5aa14f6


Add dependency for nffs to bletest


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

Branch: refs/heads/develop
Commit: c4d1c7ae52bb8b9b9d8f8bb528723934c6d15b87
Parents: 2dd32b7
Author: William San Filippo <wi...@runtime.io>
Authored: Mon May 16 13:06:49 2016 -0700
Committer: William San Filippo <wi...@runtime.io>
Committed: Mon May 16 13:06:49 2016 -0700

----------------------------------------------------------------------
 apps/bletest/pkg.yml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c4d1c7ae/apps/bletest/pkg.yml
----------------------------------------------------------------------
diff --git a/apps/bletest/pkg.yml b/apps/bletest/pkg.yml
index 943228a..84b6e71 100644
--- a/apps/bletest/pkg.yml
+++ b/apps/bletest/pkg.yml
@@ -25,6 +25,7 @@ pkg.homepage: "http://mynewt.apache.org/"
 pkg.keywords:
 
 pkg.deps: 
+    - fs/nffs
     - net/nimble/controller
     - net/nimble/host
     - libs/os 


[2/2] incubator-mynewt-core git commit: Fix scheduling bugs

Posted by we...@apache.org.
Fix scheduling bugs

There were two scheduling bugs that were uncovered during recent
testing. The first was that we should have removed the schedule
element prior to calling the connection start callback. The
second is that a currently scheduled connection could get moved
when a new connection is added. Both of these bugs could cause
connections to become disconnected if more than one connection
is ongoing.


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

Branch: refs/heads/develop
Commit: 4d5aa14f6dcca4be04581367b786c3daa873ea05
Parents: c4d1c7a
Author: William San Filippo <wi...@runtime.io>
Authored: Mon May 16 13:07:12 2016 -0700
Committer: William San Filippo <wi...@runtime.io>
Committed: Mon May 16 13:07:12 2016 -0700

----------------------------------------------------------------------
 net/nimble/controller/src/ble_ll_sched.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/4d5aa14f/net/nimble/controller/src/ble_ll_sched.c
----------------------------------------------------------------------
diff --git a/net/nimble/controller/src/ble_ll_sched.c b/net/nimble/controller/src/ble_ll_sched.c
index 82f4189..5b79217 100644
--- a/net/nimble/controller/src/ble_ll_sched.c
+++ b/net/nimble/controller/src/ble_ll_sched.c
@@ -340,9 +340,6 @@ ble_ll_sched_master_new(struct ble_ll_conn_sm *connsm, uint32_t adv_rxend,
             connsm->tx_win_off = (earliest_start - initial_start) /
                 cputime_usecs_to_ticks(BLE_LL_CONN_ITVL_USECS);
         }
-
-        /* Restart with head of list */
-        sch = TAILQ_FIRST(&g_ble_ll_sched_q);
     }
 
     if (!rc) {
@@ -353,6 +350,9 @@ ble_ll_sched_master_new(struct ble_ll_conn_sm *connsm, uint32_t adv_rxend,
         connsm->ce_end_time = earliest_end;
     }
 
+    /* Get head of list to restart timer */
+    sch = TAILQ_FIRST(&g_ble_ll_sched_q);
+
     OS_EXIT_CRITICAL(sr);
 
     cputime_timer_start(&g_ble_ll_sched_timer, sch->start_time);
@@ -669,10 +669,10 @@ ble_ll_sched_run(void *arg)
     while ((sch = TAILQ_FIRST(&g_ble_ll_sched_q)) != NULL) {
         /* Make sure we have passed the start time of the first event */
         if ((int32_t)(cputime_get32() - sch->start_time) >= 0) {
-            /* Execute the schedule item and remove it when done */
-            ble_ll_sched_execute_item(sch);
+            /* Remove schedule item and execute the callback */
             TAILQ_REMOVE(&g_ble_ll_sched_q, sch, link);
             sch->enqueued = 0;
+            ble_ll_sched_execute_item(sch);
         } else {
             cputime_timer_start(&g_ble_ll_sched_timer, sch->start_time);
             break;