Change in osmo-bsc[master]: bsc: lchan_rtp_fsm: Remove duplicate LCHAN_EV_RTP_RELEASED event

Pau Espin Pedrol gerrit-no-reply at
Thu Nov 29 15:32:11 UTC 2018

Pau Espin Pedrol has posted comments on this change. ( )

Change subject: bsc: lchan_rtp_fsm: Remove duplicate LCHAN_EV_RTP_RELEASED event

Patch Set 1:

Commit Message:
PS1, Line 23: 20181128193707330 DAS <0012> fsm.c:381 assignment(conn4_0-0-6-TCH_F_PDCHasPDCH-0)[0x6120000024a0]{WAIT_LCHAN_ACTIVE}: Deallocated
> you *could* make this a bit more readable next time :)
My bad, I kept using same steps as in previous commits, but I was already using another BSC binary compiled which outputs tese long file paths. I'll fix it in next version of the patch.
File src/osmo-bsc/lchan_rtp_fsm.c:
PS1, Line 742: 
> while it is true that this is normally a duplicate event, it does make sure that in case the RTP hit […]
I'm not sure yo get your point ntirely, let's see if I understand (after looking at the code again).

See _osmo_fsm_inst_term in fsm.c, in here we can see how the code path goes:

	/* delete ourselves from the parent */
	parent = fi->proc.parent;
	if (parent) {
		LOGPFSMSRC(fi, file, line, "Removing from parent %s\n",

	/* call destructor / clean-up function */
	if (fi->fsm->cleanup)
		fi->fsm->cleanup(fi, cause);

	LOGPFSMSRC(fi, file, line, "Freeing instance\n");
	/* Fetch parent again in case it has changed. */
	parent = fi->proc.parent;

	/* indicate our termination to the parent */
	if (parent && cause != OSMO_FSM_TERM_PARENT)
		_osmo_fsm_inst_dispatch(parent, parent_term_event, data,
					file, line);

It's seems quite clear to me that after cleanup it immediatelly follows the osmo_fsm_inst_dispatch(). BUT (I saw that now), only if cause != OSMO_FSM_TERM_PARENT, which means if lchan fsm calls "osmo_fsm_inst_term()", then it will call "osmo_fsm_inst_term_children(fi, OSMO_FSM_TERM_PARENT,...)" and then this one is needed.

So I think instead of dropping it, I should change the if condition to:
if (lchan->fi && cause == OSMO_FSM_TERM_PARENT)


To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3e95a21e5a5ec6c35b1ab20b7a642fd7eb81e556
Gerrit-Change-Number: 11993
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at>
Gerrit-Comment-Date: Thu, 29 Nov 2018 15:32:11 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list