summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorboure2008-07-25 08:19:37 +0000
committerboure2008-07-25 08:19:37 +0000
commitad38ab72b2ae7a950ffeff8c4df5ef98bfb00937 (patch)
tree18e055338d648a88fd8be73ba0e5ee72818e7ca1 /cesar
parent695d3b0ac72ee9c965e9c2553df2f471988d8225 (diff)
get_next_txop pb fixed
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@2658 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar')
-rw-r--r--cesar/cp2/cco/bw/inc/bw.h4
-rw-r--r--cesar/cp2/cco/bw/src/bw.c4
-rw-r--r--cesar/cp2/cco/bw/test/src/bw_test.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/cesar/cp2/cco/bw/inc/bw.h b/cesar/cp2/cco/bw/inc/bw.h
index c6849fd502..ef7c853206 100644
--- a/cesar/cp2/cco/bw/inc/bw.h
+++ b/cesar/cp2/cco/bw/inc/bw.h
@@ -131,8 +131,8 @@ cp_cco_bw_get_first_alloc_actual(cp_t *ctx);
*
*/
bool
-cp_cco_bw_get_alloc_ble(cp_link_ble_interval_t *first_ble,
- cp_link_ble_interval_t *last_ble,
+cp_cco_bw_get_alloc_ble(cp_link_ble_interval_t **first_ble,
+ cp_link_ble_interval_t **last_ble,
u16 nb_pb,
cp_cco_bw_alloc_t *alloc,
cp_cco_bw_alloc_t *next_alloc);
diff --git a/cesar/cp2/cco/bw/src/bw.c b/cesar/cp2/cco/bw/src/bw.c
index 6a264f6999..5cc7ca691c 100644
--- a/cesar/cp2/cco/bw/src/bw.c
+++ b/cesar/cp2/cco/bw/src/bw.c
@@ -782,7 +782,8 @@ cp_cco_bw_alloc_get_next_txop(cp_t *ctx, cp_cco_bw_alloc_t* alloc)
next_alloc = cp_cco_bw_get_next_alloc_actual(alloc);
/*Search for the next allocation*/
- while(next_alloc->cid != alloc->cid)
+ while(&next_alloc->node != list_rbegin(&ctx->bw.actual_schedule)
+ && next_alloc->cid != alloc->cid)
next_alloc = cp_cco_bw_get_next_alloc_actual(next_alloc);
/*We reached the last alloc and didn't find the one we need*/
@@ -1071,7 +1072,6 @@ cp_cco_bw_alloc_t*
cp_cco_bw_get_next_alloc_actual(cp_cco_bw_alloc_t *alloc)
{
dbg_assert(alloc);
-
return PARENT_OF(cp_cco_bw_alloc_t,
node,
list_next(&alloc->node));
diff --git a/cesar/cp2/cco/bw/test/src/bw_test.c b/cesar/cp2/cco/bw/test/src/bw_test.c
index 888be25071..1e502d4d11 100644
--- a/cesar/cp2/cco/bw/test/src/bw_test.c
+++ b/cesar/cp2/cco/bw/test/src/bw_test.c
@@ -827,7 +827,7 @@ test_case_allocate_multiple_txop (test_t test)
test_fail_if(txop[1]!= alloc_test[5],
"Wrong next TXOP");
test_fail_if(txop[2],
- "Wrong next TXOP");
+ "Wrong next TXOP it should be NULL");
}
test_end;