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 submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/25788 )
Change subject: lchan: Avoid applying transition changes if state new==old
......................................................................
lchan: Avoid applying transition changes if state new==old
Let's avoid running over state change conditions or even printing log
lines if there's no state change.
Change-Id: I1ca86aa846084f53751076643665cb6dabc26a06
---
M src/common/lchan.c
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/common/lchan.c b/src/common/lchan.c
index 5e05c86..e06ea5c 100644
--- a/src/common/lchan.c
+++ b/src/common/lchan.c
@@ -257,6 +257,8 @@
void lchan_set_state(struct gsm_lchan *lchan, enum gsm_lchan_state state)
{
+ if (lchan->state == state)
+ return;
LOGPLCHAN(lchan, DL1C, LOGL_INFO, "state %s -> %s\n",
gsm_lchans_name(lchan->state), gsm_lchans_name(state));
lchan->state = state;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/25788
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I1ca86aa846084f53751076643665cb6dabc26a06
Gerrit-Change-Number: 25788
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211014/84e74e5b/attachment.htm>