aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libxsc/xsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libxsc/xsc.c')
-rw-r--r--openbsc/src/libxsc/xsc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/openbsc/src/libxsc/xsc.c b/openbsc/src/libxsc/xsc.c
index 04bc53e1b..3692a3a3b 100644
--- a/openbsc/src/libxsc/xsc.c
+++ b/openbsc/src/libxsc/xsc.c
@@ -27,6 +27,8 @@
#include <openbsc/xsc.h>
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_subscriber.h>
+#include <openbsc/gsm_data.h>
+#include <openbsc/gsm_04_11.h>
/* Warning: if bsc_network_init() is not called, some of the members of
* gsm_network are not initialized properly and must not be used! (In
@@ -149,3 +151,16 @@ struct msgb *gsm0480_gen_releaseComplete(void)
return msg;
}
+
+uint8_t sms_next_rp_msg_ref(uint8_t *next_rp_ref)
+{
+ const uint8_t rp_msg_ref = *next_rp_ref;
+ /*
+ * This should wrap as the valid range is 0 to 255. We only
+ * transfer one SMS at a time so we don't need to check if
+ * the id has been already assigned.
+ */
+ *next_rp_ref += 1;
+
+ return rp_msg_ref;
+}