Change in osmo-bsc[master]: LCLS: explicitly check for mode before closing the loop

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

Max gerrit-no-reply at lists.osmocom.org
Sun Nov 18 21:01:33 UTC 2018


Max has submitted this change and it was merged. ( https://gerrit.osmocom.org/11565 )

Change subject: LCLS: explicitly check for mode before closing the loop
......................................................................

LCLS: explicitly check for mode before closing the loop

Change-Id: Ie91cc70de20ade2bfa3a1a108c731341f5e739bb
Related: OS#3659
---
M src/osmo-bsc/osmo_bsc_lcls.c
1 file changed, 13 insertions(+), 11 deletions(-)

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



diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c
index a406643..a25faa4 100644
--- a/src/osmo-bsc/osmo_bsc_lcls.c
+++ b/src/osmo-bsc/osmo_bsc_lcls.c
@@ -238,7 +238,6 @@
 
 static void lcls_break_local_switching(struct gsm_subscriber_connection *conn)
 {
-	struct mgcp_conn_peer mdcx_info;
 
 	LOGPFSM(conn->lcls.fi, "=== HERE IS WHERE WE DISABLE LCLS(%s)\n",
 		bsc_lcls_mode_name(conn->sccp.msc->lcls_mode));
@@ -249,11 +248,13 @@
 		return;
 	}
 
-	mdcx_info = (struct mgcp_conn_peer){
-		.port = conn->user_plane.msc_assigned_rtp_port,
-	};
-	osmo_strlcpy(mdcx_info.addr, conn->user_plane.msc_assigned_rtp_addr, sizeof(mdcx_info.addr));
-	lcls_mdcx(conn, &mdcx_info);
+	if (conn->sccp.msc->lcls_mode == BSC_LCLS_MODE_MGW_LOOP) {
+		struct mgcp_conn_peer mdcx_info = (struct mgcp_conn_peer){
+			.port = conn->user_plane.msc_assigned_rtp_port,
+		};
+		osmo_strlcpy(mdcx_info.addr, conn->user_plane.msc_assigned_rtp_addr, sizeof(mdcx_info.addr));
+		lcls_mdcx(conn, &mdcx_info);
+	}
 }
 
 static bool lcls_enable_possible(struct gsm_subscriber_connection *conn)
@@ -579,7 +580,6 @@
 	struct gsm_subscriber_connection *conn = fi->priv;
 	struct gsm_subscriber_connection *conn_other = conn->lcls.other;
 	const struct mgcp_conn_peer *other_mgw_info;
-	struct mgcp_conn_peer mdcx_info;
 
 	OSMO_ASSERT(conn_other);
 
@@ -601,10 +601,12 @@
 		return;
 	}
 
-	mdcx_info = *other_mgw_info;
-	/* Make sure the request doesn't want to use the other side's endpoint string. */
-	mdcx_info.endpoint[0] = 0;
-	lcls_mdcx(conn, &mdcx_info);
+	if (conn->sccp.msc->lcls_mode == BSC_LCLS_MODE_MGW_LOOP) {
+		struct mgcp_conn_peer mdcx_info = *other_mgw_info;
+		/* Make sure the request doesn't want to use the other side's endpoint string. */
+		mdcx_info.endpoint[0] = 0;
+		lcls_mdcx(conn, &mdcx_info);
+	}
 }
 
 static void lcls_locally_switched_wait_break_fn(struct osmo_fsm_inst *fi, uint32_t event, void *data)

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie91cc70de20ade2bfa3a1a108c731341f5e739bb
Gerrit-Change-Number: 11565
Gerrit-PatchSet: 6
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-CC: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181118/bc038a75/attachment.htm>


More information about the gerrit-log mailing list