Change in osmo-bts[master]: cbch: Implement handling of "Schedule" message
Harald Welte
gerrit-no-reply at lists.osmocom.org
Sun May 19 22:13:31 UTC 2019
Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14090
Change subject: cbch: Implement handling of "Schedule" message
......................................................................
cbch: Implement handling of "Schedule" message
The first block of "schedule" messages must be advertised with
a special sequence number coding, see Table 1 of 3GPP TS 44.012.
Change-Id: I473edf698eba7ff5008f2fd1ec1776f0aa013858
Closes: OS#4012
---
M src/common/cbch.c
1 file changed, 10 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/90/14090/1
diff --git a/src/common/cbch.c b/src/common/cbch.c
index c628cb5..cde1a0c 100644
--- a/src/common/cbch.c
+++ b/src/common/cbch.c
@@ -1,6 +1,6 @@
/* Cell Broadcast routines */
-/* (C) 2014 by Harald Welte <laforge at gnumonks.org>
+/* (C) 2014,2018-2019 by Harald Welte <laforge at gnumonks.org>
*
* All Rights Reserved
*
@@ -31,6 +31,7 @@
struct smscb_msg {
struct llist_head list; /* list in smscb_state.queue */
+ bool is_schedule; /* is this a schedule message? */
uint8_t msg[GSM412_MSG_LEN]; /* message buffer */
uint8_t next_seg; /* next segment number */
uint8_t num_segs; /* total number of segments */
@@ -78,7 +79,11 @@
memcpy(out, &msg->msg[msg->next_seg * GSM412_BLOCK_LEN], to_copy);
/* set + increment sequence number */
- block_type->seq_nr = msg->next_seg++;
+ if (msg->next_seg == 0 && msg->is_schedule) {
+ block_type->seq_nr = 8; /* first schedule block */
+ msg->next_seg++;
+ } else
+ block_type->seq_nr = msg->next_seg++;
/* determine if this is the last block */
if (block_type->seq_nr + 1 == msg->num_segs)
@@ -126,6 +131,9 @@
/* next segment is first segment */
scm->next_seg = 0;
+ if (cmd_type.command == RSL_CB_CMD_TYPE_SCHEDULE)
+ scm->is_schedule = true;
+
switch (cmd_type.command) {
case RSL_CB_CMD_TYPE_NORMAL:
case RSL_CB_CMD_TYPE_SCHEDULE:
--
To view, visit https://gerrit.osmocom.org/14090
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: I473edf698eba7ff5008f2fd1ec1776f0aa013858
Gerrit-Change-Number: 14090
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/20190519/3d4d4915/attachment.html>
More information about the gerrit-log
mailing list