aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-07-06 04:04:48 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2021-07-11 20:11:07 +0200
commit9de09c974fc1916023f17996822a29b41bcefb61 (patch)
tree89024d40e96d27bb713d27839427f41861385cba /src
parent052934d0e6689cfef20b909942562ab9a09eb515 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bsc/lchan_fsm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 841415fdd..e1dacb3af 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -433,6 +433,8 @@ void lchan_fsm_init()
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 @@ void lchan_fsm_alloc(struct gsm_lchan *lchan)
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