aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-07-18 20:54:22 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-07-18 20:54:24 +0700
commit9d5a115ee20bc6e446e57d3efb9ca955a751de10 (patch)
tree5860eee6ed78f5a25dcaf083f475893b9d0d65e3
parent8f628ab77f11baeb75c1c0a51f8c1ac40c97e5ad (diff)
encoding: assert() presence of Downlink TBF
This is not something that should normally happen. If it happens, then it's definitely a bug, and we should not tolerate it. Change-Id: I6e46ba42650f0db2399649b536a1d2b3f0fcbf04
-rw-r--r--src/encoding.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/encoding.cpp b/src/encoding.cpp
index 25645754..9dfd7c93 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -494,10 +494,7 @@ int Encoding::write_immediate_assignment(
/* 3GPP TS 44.018 ยง10.5.2.16 IA Rest Octets */
dest->cur_bit = wp;
if (downlink) {
- if (!as_dl_tbf(tbf)) {
- LOGP(DRLCMACDL, LOGL_ERROR, "Cannot encode DL IMMEDIATE ASSIGNMENT without TBF\n");
- return -EINVAL;
- }
+ OSMO_ASSERT(as_dl_tbf(tbf) != NULL);
rc = write_ia_rest_downlink(as_dl_tbf(tbf), dest, polling, gsm48_ta_is_valid(ta), fn, alpha, gamma,
ta_idx);