Change in openbsc[master]: mgcp: Avoid initing output without enabling osmux

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Oct 12 20:05:28 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11326 )

Change subject: mgcp: Avoid initing output without enabling osmux
......................................................................

mgcp: Avoid initing output without enabling osmux

Otherwise we end up in a weird state where we have timers set up but
osmux is still flagged as not enabled.

Change-Id: I15c3a1a6bdf2566b03d1d543d8d15e4117a53622
---
M openbsc/src/libmgcp/mgcp_osmux.c
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index 69f1c66..0a4441c 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -447,10 +447,6 @@
 		return -1;
 	}
 
-	osmux_xfrm_output_init(&endp->osmux.out,
-			       (endp->osmux.cid * rtp_ssrc_winlen) +
-			       (random() % rtp_ssrc_winlen));
-
 	endp->osmux.in = osmux_handle_lookup(endp->cfg, addr, port);
 	if (!endp->osmux.in) {
 		LOGP(DMGCP, LOGL_ERROR, "Cannot allocate input osmux handle\n");
@@ -463,6 +459,10 @@
 		return -1;
 	}
 
+	osmux_xfrm_output_init(&endp->osmux.out,
+			       (endp->osmux.cid * rtp_ssrc_winlen) +
+			       (random() % rtp_ssrc_winlen));
+
 	switch (endp->cfg->role) {
 		case MGCP_BSC_NAT:
 			endp->type = MGCP_OSMUX_BSC_NAT;

-- 
To view, visit https://gerrit.osmocom.org/11326
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I15c3a1a6bdf2566b03d1d543d8d15e4117a53622
Gerrit-Change-Number: 11326
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181012/f5e49a7e/attachment.htm>


More information about the gerrit-log mailing list