Change in osmo-bsc[master]: LCLS: expand logging to print the name of the mode in use

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
Wed Nov 7 12:08:26 UTC 2018


Max has uploaded this change for review. ( https://gerrit.osmocom.org/11652


Change subject: LCLS: expand logging to print the name of the mode in use
......................................................................

LCLS: expand logging to print the name of the mode in use

Change-Id: I56b57936ae82984e84896228da5a83115a78bbd7
Related: OS#3659
---
M include/osmocom/bsc/bsc_msc_data.h
M src/osmo-bsc/gsm_data.c
M src/osmo-bsc/osmo_bsc_lcls.c
M src/osmo-bsc/osmo_bsc_vty.c
4 files changed, 18 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/52/11652/1

diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h
index 6ca0330..32b161e 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -59,6 +59,13 @@
 	/* we may later introduce BTS_LOOP here: direct RTP between BTSs */
 };
 
+extern const struct value_string bsc_lcls_mode_names[];
+
+static inline const char *bsc_lcls_mode_name(enum bsc_lcls_mode m)
+{
+	return get_value_string(bsc_lcls_mode_names, m);
+}
+
 /*! /brief Information on a remote MSC for libbsc.
  */
 struct bsc_msc_data {
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 08d5bcb..56eb24e 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -47,6 +47,12 @@
 
 void *tall_bsc_ctx = NULL;
 
+const struct value_string bsc_lcls_mode_names[] = {
+	{ BSC_LCLS_MODE_DISABLED,	"disabled" },
+	{ BSC_LCLS_MODE_MGW_LOOP,	"mgw-loop" },
+	{ 0, NULL }
+};
+
 static LLIST_HEAD(bts_models);
 
 void set_ts_e1link(struct gsm_bts_trx_ts *ts, uint8_t e1_nr,
diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c
index e642976..a406643 100644
--- a/src/osmo-bsc/osmo_bsc_lcls.c
+++ b/src/osmo-bsc/osmo_bsc_lcls.c
@@ -240,7 +240,9 @@
 {
 	struct mgcp_conn_peer mdcx_info;
 
-	LOGPFSM(conn->lcls.fi, "=== HERE IS WHERE WE DISABLE LCLS\n");
+	LOGPFSM(conn->lcls.fi, "=== HERE IS WHERE WE DISABLE LCLS(%s)\n",
+		bsc_lcls_mode_name(conn->sccp.msc->lcls_mode));
+
 	if (!conn->user_plane.mgw_endpoint_ci_msc) {
 		/* the MGCP FSM has died, e.g. due to some MGCP/SDP parsing error */
 		LOGPFSML(conn->lcls.fi, LOGL_NOTICE, "Cannot disable LCLS without MSC-side MGCP FSM\n");
@@ -581,7 +583,8 @@
 
 	OSMO_ASSERT(conn_other);
 
-	LOGPFSM(fi, "=== HERE IS WHERE WE ENABLE LCLS\n");
+	LOGPFSM(fi, "=== HERE IS WHERE WE ENABLE LCLS(%s)\n",
+		bsc_lcls_mode_name(conn->sccp.msc->lcls_mode));
 	if (!conn->user_plane.mgw_endpoint_ci_msc) {
 		LOGPFSML(fi, LOGL_ERROR, "Cannot enable LCLS without MSC-side MGCP FSM. FIXME\n");
 		return;
diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index f90ad6f..14fd274 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -38,12 +38,6 @@
 
 #define IPA_STR "IP.ACCESS specific\n"
 
-static const struct value_string bsc_lcls_mode_names[] = {
-	{ BSC_LCLS_MODE_DISABLED,	"disabled" },
-	{ BSC_LCLS_MODE_MGW_LOOP,	"mgw-loop" },
-	{ 0, NULL }
-};
-
 static struct osmo_bsc_data *osmo_bsc_data(struct vty *vty)
 {
 	return bsc_gsmnet->bsc_data;

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I56b57936ae82984e84896228da5a83115a78bbd7
Gerrit-Change-Number: 11652
Gerrit-PatchSet: 1
Gerrit-Owner: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181107/6dafdc88/attachment.htm>


More information about the gerrit-log mailing list