Change in osmo-bsc[master]: lchan: call reset() upon alloc

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/.

neels gerrit-no-reply at lists.osmocom.org
Sun Jul 11 19:18:35 UTC 2021


neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24882 )

Change subject: lchan: call reset() upon alloc
......................................................................

lchan: call reset() upon alloc

call lchan_reset() after allocation, to make sure that lchan->* fields
that have a nonzero default value get initialized properly.

In particular, a future patch adds interference measurements, and an
lchan that never received any Resource Indication info should always
indicate that there are no measurements (a nonzero constant).

Related: SYS#5313
Change-Id: I700a969f5b11c21dacda9a7cad00c943dce554b3
---
M src/osmo-bsc/lchan_fsm.c
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved



diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 841415f..e1dacb3 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -433,6 +433,8 @@
 	lchan_rtp_fsm_init();
 }
 
+static void lchan_reset(struct gsm_lchan *lchan);
+
 void lchan_fsm_alloc(struct gsm_lchan *lchan)
 {
 	OSMO_ASSERT(lchan->ts);
@@ -444,6 +446,7 @@
 	lchan->fi->priv = lchan;
 	lchan_fsm_update_id(lchan);
 	LOGPFSML(lchan->fi, LOGL_DEBUG, "new lchan\n");
+	lchan_reset(lchan);
 }
 
 /* Clear volatile state of the lchan. Clear all except

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24882
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I700a969f5b11c21dacda9a7cad00c943dce554b3
Gerrit-Change-Number: 24882
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr 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/20210711/b8055444/attachment.htm>


More information about the gerrit-log mailing list