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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11218 ) Change subject: layer23/l1ctl.c: avoid confusion between L1CTL / L1 headers ...................................................................... layer23/l1ctl.c: avoid confusion between L1CTL / L1 headers As we assign the payload following L1CTL header to 'msg->l1h', it makes sense to avoid possible naming confusion. Change-Id: I5d21ca8664b3445f472d3ffde90d0e11805dcb16 --- M src/host/layer23/src/common/l1ctl.c 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c index c8695ca..642cde8 100644 --- a/src/host/layer23/src/common/l1ctl.c +++ b/src/host/layer23/src/common/l1ctl.c @@ -872,10 +872,10 @@ int l1ctl_recv(struct osmocom_ms *ms, struct msgb *msg) { int rc = 0; - struct l1ctl_hdr *l1h; + struct l1ctl_hdr *hdr; /* Make sure a message has L1CTL header (pointed by msg->l1h) */ - if (msgb_l1len(msg) < sizeof(*l1h)) { + if (msgb_l1len(msg) < sizeof(*hdr)) { LOGP(DL1C, LOGL_ERROR, "Short L1CTL message, " "missing the header (len=%u)\n", msgb_l1len(msg)); msgb_free(msg); @@ -883,14 +883,14 @@ } /* Pull the L1CTL header from the msgb */ - l1h = (struct l1ctl_hdr *) msg->l1h; + hdr = (struct l1ctl_hdr *) msg->l1h; msgb_pull(msg, sizeof(struct l1ctl_hdr)); /* move the l1 header pointer to point _BEHIND_ l1ctl_hdr, as the l1ctl header is of no interest to subsequent code */ - msg->l1h = l1h->data; + msg->l1h = hdr->data; - switch (l1h->msg_type) { + switch (hdr->msg_type) { case L1CTL_FBSB_CONF: rc = rx_l1_fbsb_conf(ms, msg); msgb_free(msg); @@ -908,7 +908,7 @@ break; case L1CTL_PM_CONF: rc = rx_l1_pm_conf(ms, msg); - if (l1h->flags & L1CTL_F_DONE) + if (hdr->flags & L1CTL_F_DONE) osmo_signal_dispatch(SS_L1CTL, S_L1CTL_PM_DONE, ms); msgb_free(msg); break; @@ -937,7 +937,7 @@ msgb_free(msg); break; default: - LOGP(DL1C, LOGL_ERROR, "Unknown MSG: %u\n", l1h->msg_type); + LOGP(DL1C, LOGL_ERROR, "Unknown MSG: %u\n", hdr->msg_type); msgb_free(msg); break; } -- To view, visit https://gerrit.osmocom.org/11218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5d21ca8664b3445f472d3ffde90d0e11805dcb16 Gerrit-Change-Number: 11218 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181005/1e47d672/attachment.htm>