Change in osmo-bts[master]: cbch: Log every RSL SMSCB COMMAND with type and number of blocks

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon May 20 12:39:32 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14099


Change subject: cbch: Log every RSL SMSCB COMMAND with type and number of blocks
......................................................................

cbch: Log every RSL SMSCB COMMAND with type and number of blocks

Change-Id: I20efe0aa5a67f011d6b6bead57236366c2f45ecf
---
M src/common/cbch.c
1 file changed, 15 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/99/14099/1

diff --git a/src/common/cbch.c b/src/common/cbch.c
index c253805..817489f 100644
--- a/src/common/cbch.c
+++ b/src/common/cbch.c
@@ -116,6 +116,14 @@
 	[RSL_CB_CMD_LASTBLOCK_3]	= 3,
 };
 
+static const struct value_string rsl_cb_cmd_names[] = {
+	{ RSL_CB_CMD_TYPE_NORMAL,	"NORMAL" },
+	{ RSL_CB_CMD_TYPE_SCHEDULE,	"SCHEDULE" },
+	{ RSL_CB_CMD_TYPE_DEFAULT,	"DEFAULT" },
+	{ RSL_CB_CMD_TYPE_NULL,		"NULL" },
+	{ 0, NULL }
+};
+
 
 /* incoming SMS broadcast command from RSL */
 int bts_process_smscb_cmd(struct gsm_bts *bts,
@@ -141,13 +149,17 @@
 	if (cmd_type.command == RSL_CB_CMD_TYPE_SCHEDULE)
 		scm->is_schedule = true;
 
+	scm->num_segs = last_block_rsl2um[cmd_type.last_block&3];
+	memcpy(scm->msg, msg, msg_len);
+
+	LOGP(DLSMS, LOGL_INFO, "RSL SMSCB COMMAND (type=%s, num_blocks=%u)\n",
+		get_value_string(rsl_cb_cmd_names, cmd_type.command), scm->num_segs);
+
 	switch (cmd_type.command) {
 	case RSL_CB_CMD_TYPE_NORMAL:
 	case RSL_CB_CMD_TYPE_SCHEDULE:
 	case RSL_CB_CMD_TYPE_NULL:
-		scm->num_segs = last_block_rsl2um[cmd_type.last_block&3];
-		memcpy(scm->msg, msg, msg_len);
-		/* def_bcast is ignored */
+		/* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 */
 		break;
 	case RSL_CB_CMD_TYPE_DEFAULT:
 		/* use def_bcast, ignore command  */

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I20efe0aa5a67f011d6b6bead57236366c2f45ecf
Gerrit-Change-Number: 14099
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190520/a0ebcd70/attachment.html>


More information about the gerrit-log mailing list