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.orgMax has submitted this change and it was merged. ( https://gerrit.osmocom.org/11564 )
Change subject: LCLS: move MGCP MDCX into separate function
......................................................................
LCLS: move MGCP MDCX into separate function
Move code using MDCX via MGCP into separate function to make adding
alternative MDCX variants easier.
Change-Id: I5fafa3b12a39c83bdf64e16e192dd2454d069cf4
Related: OS#3659
---
M src/osmo-bsc/osmo_bsc_lcls.c
1 file changed, 11 insertions(+), 9 deletions(-)
Approvals:
Neels Hofmeyr: Looks good to me, approved
Pau Espin Pedrol: 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 b8bf601..e642976 100644
--- a/src/osmo-bsc/osmo_bsc_lcls.c
+++ b/src/osmo-bsc/osmo_bsc_lcls.c
@@ -227,6 +227,15 @@
osmo_fsm_inst_dispatch(conn->lcls.fi, LCLS_EV_APPLY_CFG_CSC, NULL);
}
+/* Close the loop for LCLS using MGCP */
+static inline void lcls_mdcx(const struct gsm_subscriber_connection *conn, struct mgcp_conn_peer *mdcx_info)
+{
+ mgcp_pick_codec(mdcx_info, conn->lchan, false);
+
+ mgw_endpoint_ci_request(conn->user_plane.mgw_endpoint_ci_msc, MGCP_VERB_MDCX, mdcx_info,
+ NULL, 0, 0, NULL);
+}
+
static void lcls_break_local_switching(struct gsm_subscriber_connection *conn)
{
struct mgcp_conn_peer mdcx_info;
@@ -242,11 +251,7 @@
.port = conn->user_plane.msc_assigned_rtp_port,
};
osmo_strlcpy(mdcx_info.addr, conn->user_plane.msc_assigned_rtp_addr, sizeof(mdcx_info.addr));
- mgcp_pick_codec(&mdcx_info, conn->lchan, false);
-
- mgw_endpoint_ci_request(conn->user_plane.mgw_endpoint_ci_msc,
- MGCP_VERB_MDCX, &mdcx_info,
- NULL, 0, 0, NULL);
+ lcls_mdcx(conn, &mdcx_info);
}
static bool lcls_enable_possible(struct gsm_subscriber_connection *conn)
@@ -596,10 +601,7 @@
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;
- mgcp_pick_codec(&mdcx_info, conn->lchan, false);
- mgw_endpoint_ci_request(conn->user_plane.mgw_endpoint_ci_msc,
- MGCP_VERB_MDCX, &mdcx_info,
- NULL, 0, 0, NULL);
+ 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/11564
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: I5fafa3b12a39c83bdf64e16e192dd2454d069cf4
Gerrit-Change-Number: 11564
Gerrit-PatchSet: 3
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181106/8479f364/attachment.htm>