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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17427 ) Change subject: l1sap: Use msgb_pull_l2() and unify l1sap_tch_ind + l1sap_ph_data_ind ...................................................................... l1sap: Use msgb_pull_l2() and unify l1sap_tch_ind + l1sap_ph_data_ind In l1sap_ph_data_ind() we can use msgb_pull_l2() which is an exact implementation of the functionality there. In l1sap_tch_ind(), the existing code is actually wrong by making the assumption that the msgb contains exactly an entire osmo_phsap_prim. Better to also dynamically compute the number of bytes to ensure we only pull those ahead of the L2 header, no matter what their exact count. Change-Id: I13f7f8ba93795e40b1fb4a306fe765e059f642cf --- M src/common/l1sap.c 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/27/17427/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 05dbb6f..673430d 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1355,8 +1355,7 @@ l1sap_tx_ciph_req(lchan->ts->trx, chan_nr, 1, 0); /* SDCCH, SACCH and FACCH all go to LAPDm */ - msgb_pull(msg, (msg->l2h - msg->data)); - msg->l1h = NULL; + msgb_pull_to_l2(msg); lapdm_phsap_up(&l1sap->oph, le); /* don't free, because we forwarded data */ @@ -1393,7 +1392,7 @@ if (gsm_bts_has_feature(trx->bts, BTS_FEAT_MEAS_PAYLOAD_COMB)) process_l1sap_meas_data(trx, l1sap, PRIM_TCH); - msgb_pull(msg, sizeof(*l1sap)); + msgb_pull_to_l2(msg); /* Low level layers always call us when TCH content is expected, even if * the content is not available due to decoding issues. Content not -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17427 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I13f7f8ba93795e40b1fb4a306fe765e059f642cf Gerrit-Change-Number: 17427 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200308/78d5e8bb/attachment.htm>