summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/sched_prim.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-12-28 19:44:49 +0100
committerVadim Yanitskiy <axilirator@gmail.com>2018-01-04 00:10:18 +0100
commit6c0b1261a3cb62b578bf3f86d06f5498e70bf589 (patch)
tree90bd826003d54fd1d544d5d3c3bb0e03e6a6c3e2 /src/host/trxcon/sched_prim.c
parentfeec102aea039c4091fa9cf6075d45fd23448bd3 (diff)
trxcon/scheduler: FIX: return NULL from TCH dequeue function
Initially it was expected that a TCH transmit queue could contain TCH and FACCH primitives only. But there are also SACCH primitives, which are also being stored there. So, let's drop the assertations from the sched_prim_dequeue_tch(), and return NULL if nothing was found. Change-Id: Iae37057d35883c09a76f0612e52c2d14d9ff91cb
Diffstat (limited to 'src/host/trxcon/sched_prim.c')
-rw-r--r--src/host/trxcon/sched_prim.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/host/trxcon/sched_prim.c b/src/host/trxcon/sched_prim.c
index da2ff3be..1f466a1e 100644
--- a/src/host/trxcon/sched_prim.c
+++ b/src/host/trxcon/sched_prim.c
@@ -141,7 +141,7 @@ int sched_prim_push(struct trx_instance *trx,
* dropped (i.e. replaced).
*
* @param queue a transmit queue to take a prim from
- * @return a FACCH or TCH primitive
+ * @return a FACCH or TCH primitive, otherwise NULL
*/
static struct trx_ts_prim *sched_prim_dequeue_tch(struct llist_head *queue)
{
@@ -164,9 +164,6 @@ static struct trx_ts_prim *sched_prim_dequeue_tch(struct llist_head *queue)
break;
}
- /* There should be at least one frame found */
- OSMO_ASSERT(facch || tch);
-
/* Prioritize FACCH */
if (facch && tch) {
/* We found a pair, dequeue both */
@@ -188,8 +185,11 @@ static struct trx_ts_prim *sched_prim_dequeue_tch(struct llist_head *queue)
return tch;
}
- /* Unreachable */
- OSMO_ASSERT(0);
+ /**
+ * Nothing was found,
+ * e.g. only SACCH frames are in queue
+ */
+ return NULL;
}
/**