diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-10-25 17:35:40 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-10-25 18:32:54 +0200 |
commit | fb905b8d235ff2efe6c1cd9fde2b488b311c1cd7 (patch) | |
tree | 5247181e727646913bde419ef5db10cc9bef4277 /src/common | |
parent | 5c5982067d4eba1f52239fc100c8dfe48202ad77 (diff) |
scheduler: Fix check against empty PDCH blocks
msgb_l2len() will return nonzero values if msg->l2h is NULL.
Let's check against msg->l2h being NULL instead.
Related: SYS#5676
Related: SYS#4919
Fixes: 300e31ed135c674cd44526b7503d4664a45a9ec3
Change-Id: I18b61fcaa858a53887191a18d560c2e929478c64
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/scheduler.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/scheduler.c b/src/common/scheduler.c index a53de098..c068ea04 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -869,7 +869,7 @@ int trx_sched_ph_data_req(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap OSMO_ASSERT(l1sap->oph.msg); /* ignore empty frame */ - if (!msgb_l2len(l1sap->oph.msg)) { + if (!l1sap->oph.msg->l2h) { msgb_free(l1sap->oph.msg); return 0; } |