This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/18861 ) Change subject: scheduler: _sched_dequeue_prim(): Refactor found_msg goto path ...................................................................... scheduler: _sched_dequeue_prim(): Refactor found_msg goto path Change-Id: Icf7414d9fb17bbc3eb384329f587b3042ba0fcd5 --- M src/common/scheduler.c 1 file changed, 11 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/61/18861/1 diff --git a/src/common/scheduler.c b/src/common/scheduler.c index ed7d412..c1bd19f 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -679,24 +679,21 @@ return NULL; /* l1sap_fn == fn */ - goto found_msg; + if ((chan_nr ^ (trx_chan_desc[chan].chan_nr | tn)) + || ((link_id & 0xc0) ^ trx_chan_desc[chan].link_id)) { + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Prim has wrong chan_nr=0x%02x link_id=%02x, " + "expecting chan_nr=0x%02x link_id=%02x.\n", chan_nr, link_id, + trx_chan_desc[chan].chan_nr | tn, trx_chan_desc[chan].link_id); + goto free_msg; + } + + /* unlink and return message */ + llist_del(&msg->list); + return msg; } return NULL; -found_msg: - if ((chan_nr ^ (trx_chan_desc[chan].chan_nr | tn)) - || ((link_id & 0xc0) ^ trx_chan_desc[chan].link_id)) { - LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Prim has wrong chan_nr=0x%02x link_id=%02x, " - "expecting chan_nr=0x%02x link_id=%02x.\n", chan_nr, link_id, - trx_chan_desc[chan].chan_nr | tn, trx_chan_desc[chan].link_id); - goto free_msg; - } - - /* unlink and return message */ - llist_del(&msg->list); - return msg; - free_msg: /* unlink and free message */ llist_del(&msg->list); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18861 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Icf7414d9fb17bbc3eb384329f587b3042ba0fcd5 Gerrit-Change-Number: 18861 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200616/40bc0871/attachment.htm>