Change in osmo-bsc[master]: smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed May 22 12:42:11 UTC 2019


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


Change subject: smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB
......................................................................

smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB

Change-Id: Iad41d24c87d091b8eb144544802d44def925ca70
---
M src/osmo-bsc/bsc_vty.c
1 file changed, 19 insertions(+), 5 deletions(-)



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

diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 88c845b..d24f0c7 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -4533,14 +4533,19 @@
 
 
 DEFUN(smscb_cmd, smscb_cmd_cmd,
-	"bts <0-255> smscb-command <1-4> HEXSTRING",
+	"bts <0-255> smscb-command (normal|schedule|default) <1-4> HEXSTRING",
 	"BTS related commands\n" BTS_NR_STR
-	"SMS Cell Broadcast\n" "Last Valid Block\n"
+	"SMS Cell Broadcast\n"
+	"Normal (one-shot) SMSCB Message; sent once over Abis+Um\n"
+	"Schedule (one-shot) SMSCB Messag; sent once over Abis+Ume\n"
+	"Default (repeating) SMSCB Message; sent once over Abis, unlimited ovrer Um\n"
+	"Last Valid Block\n"
 	"Hex Encoded SMSCB message (up to 88 octets)\n")
 {
 	struct gsm_bts *bts;
 	int bts_nr = atoi(argv[0]);
-	int last_block = atoi(argv[1]);
+	const char *type_str = argv[1];
+	int last_block = atoi(argv[2]);
 	struct rsl_ie_cb_cmd_type cb_cmd;
 	uint8_t buf[88];
 	int rc;
@@ -4554,7 +4559,7 @@
 		vty_out(vty, "%% BTS %d doesn't have a CBCH%s", bts_nr, VTY_NEWLINE);
 		return CMD_WARNING;
 	}
-	rc = osmo_hexparse(argv[2], buf, sizeof(buf));
+	rc = osmo_hexparse(argv[3], buf, sizeof(buf));
 	if (rc < 0 || rc > sizeof(buf)) {
 		vty_out(vty, "Error parsing HEXSTRING%s", VTY_NEWLINE);
 		return CMD_WARNING;
@@ -4562,7 +4567,16 @@
 
 	cb_cmd.spare = 0;
 	cb_cmd.def_bcast = 0;
-	cb_cmd.command = RSL_CB_CMD_TYPE_NORMAL;
+	if (!strcmp(type_str, "normal"))
+		cb_cmd.command = RSL_CB_CMD_TYPE_NORMAL;
+	else if (!strcmp(type_str, "schedule"))
+		cb_cmd.command = RSL_CB_CMD_TYPE_SCHEDULE;
+	else if (!strcmp(type_str, "default"))
+		cb_cmd.command = RSL_CB_CMD_TYPE_DEFAULT;
+	else {
+		vty_out(vty, "Error parsing type%s", VTY_NEWLINE);
+		return CMD_WARNING;
+	}
 
 	switch (last_block) {
 	case 1:

-- 
To view, visit https://gerrit.osmocom.org/14129
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: Iad41d24c87d091b8eb144544802d44def925ca70
Gerrit-Change-Number: 14129
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/20190522/d58d3a24/attachment.html>


More information about the gerrit-log mailing list