[MERGED] openbsc[master]: gsm0408: Adding log output for 3g specific RR messages

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
Tue Nov 1 21:56:24 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: gsm0408: Adding log output for 3g specific RR messages
......................................................................


gsm0408: Adding log output for 3g specific RR messages

GSM 04.18, which is the successor of GSM 04.08, describes
additional RR 3g specific message types. This commit adds
log output for those messages. The behaviour is not changed
all affected message types are still forwared to the MSC
as they were before.

See also 3GPP TS 04.18, section 10.4, table 10.4.1

The change requires to update libosmocore as well, see
also commit f48fdb3a108da0dc23d7af4ac021e98e11f07152 in
libosmocore.git for details.

Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa
---
M openbsc/src/libbsc/bsc_api.c
M openbsc/src/libmsc/gsm_04_08.c
2 files changed, 11 insertions(+), 7 deletions(-)

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



diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index cc12e9f..207e12a 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -34,6 +34,7 @@
 #include <openbsc/trau_mux.h>
 
 #include <osmocom/gsm/protocol/gsm_08_08.h>
+#include <osmocom/gsm/gsm48.h>
 
 #include <osmocom/core/talloc.h>
 
@@ -587,11 +588,13 @@
 	case GSM48_PDISC_RR:
 		switch (msg_type) {
 		case GSM48_MT_RR_GPRS_SUSP_REQ:
-			DEBUGP(DRR, "GRPS SUSPEND REQUEST\n");
+			DEBUGP(DRR, "%s\n",
+			       gsm48_rr_msg_name(GSM48_MT_RR_GPRS_SUSP_REQ));
 			break;
 		case GSM48_MT_RR_STATUS:
-			LOGP(DRR, LOGL_NOTICE, "RR STATUS (cause: %s)\n",
-				rr_cause_name(gh->data[0]));
+			LOGP(DRR, LOGL_NOTICE, "%s (cause: %s)\n",
+			     gsm48_rr_msg_name(GSM48_MT_RR_GPRS_SUSP_REQ),
+			     rr_cause_name(gh->data[0]));
 			break;
 		case GSM48_MT_RR_MEAS_REP:
 			/* This shouldn't actually end up here, as RSL treats
@@ -643,8 +646,9 @@
 			/* Normally, a MSC should never receive RR
 			 * messages, but we'd rather forward what we
 			 * don't know than drop it... */
-			LOGP(DRR, LOGL_NOTICE, "BSC: Passing unknown 04.08 "
-			     "RR message type 0x%02x to MSC\n", msg_type);
+			LOGP(DRR, LOGL_NOTICE,
+			     "BSC: Passing %s 04.08 RR message to MSC\n",
+			     gsm48_rr_msg_name(msg_type));
 			if (api->dtap)
 				api->dtap(conn, link_id, msg);
 		}
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index a22e3c2..3e362fa 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -1270,8 +1270,8 @@
 		rc = gsm48_rx_rr_app_info(conn, msg);
 		break;
 	default:
-		LOGP(DRR, LOGL_NOTICE, "MSC: Unimplemented "
-			"GSM 04.08 RR msg type 0x%02x\n", gh->msg_type);
+		LOGP(DRR, LOGL_NOTICE, "MSC: Unimplemented %s GSM 04.08 RR "
+		     "message\n", gsm48_rr_msg_name(gh->msg_type));
 		break;
 	}
 

-- 
To view, visit https://gerrit.osmocom.org/1037
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa
Gerrit-PatchSet: 9
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list