Change in osmo-msc[master]: msc_main: mncc: move mncc socket decision to after read_cfg

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
Wed Dec 5 19:35:16 UTC 2018


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

Change subject: msc_main: mncc: move mncc socket decision to after read_cfg
......................................................................

msc_main: mncc: move mncc socket decision to after read_cfg

First step towards allowing to configure the MNCC socket path by config file.

Rationale: see I2ec59d5eba407f83295528b51b93678d446b9cee

Change-Id: Ifc87c1cacaa809d04fc23e8ccd761bee4509c805
---
M src/osmo-msc/msc_main.c
1 file changed, 4 insertions(+), 5 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Stefan Sperling: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index 07e4c8b..157d5ae 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -545,11 +545,9 @@
 	/* Parse options */
 	handle_options(argc, argv);
 
-	/* Allocate global gsm_network struct; choose socket/internal MNCC */
-	msc_network = msc_network_alloc(tall_msc_ctx,
-				        msc_cmdline_config.mncc_sock_path?
-						mncc_sock_from_cc
-						: int_mncc_recv);
+	/* Allocate global gsm_network struct.
+	 * At first set the internal MNCC as default, may be changed below according to cfg or cmdline option. */
+	msc_network = msc_network_alloc(tall_msc_ctx, int_mncc_recv);
 	if (!msc_network)
 		return -ENOMEM;
 
@@ -577,6 +575,7 @@
 
 	/* Initialize MNCC socket if appropriate */
 	if (msc_cmdline_config.mncc_sock_path) {
+		msc_network->mncc_recv = mncc_sock_from_cc;
 		rc = mncc_sock_init(msc_network,
 				    msc_cmdline_config.mncc_sock_path);
 		if (rc) {

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc87c1cacaa809d04fc23e8ccd761bee4509c805
Gerrit-Change-Number: 12129
Gerrit-PatchSet: 7
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Stefan Sperling <stsp at stsp.name>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181205/a9c57aaf/attachment.htm>


More information about the gerrit-log mailing list