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
This commit is contained in:
parent
052934d0e6
commit
9de09c974f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue