summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile/primitives.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2017-11-17 15:45:12 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2017-12-03 12:58:52 +0000
commit714cb53282c89d50055a17b67047d50b03d69521 (patch)
treeeed4df09569286817505c123262a36673c6b1d5e /src/host/layer23/src/mobile/primitives.c
parent88060f462cde2e3e6f4fc3cbf9c3708083e27dac (diff)
mobile: Inform the primitive layer about status and new sms
Inform the layer about new SMS and inform about the cause of it. In both cases pass the SMS. Change-Id: Ib7ab34b1b85b62ef0e8fff347adccbc5dc414161
Diffstat (limited to 'src/host/layer23/src/mobile/primitives.c')
-rw-r--r--src/host/layer23/src/mobile/primitives.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c
index dde34bcc..0902139e 100644
--- a/src/host/layer23/src/mobile/primitives.c
+++ b/src/host/layer23/src/mobile/primitives.c
@@ -126,6 +126,24 @@ void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_sta
dispatch(ms, prim);
}
+void mobile_prim_ntfy_sms_new(struct osmocom_ms *ms, struct gsm_sms *sms)
+{
+ struct mobile_prim *prim = mobile_prim_alloc(PRIM_MOB_SMS, PRIM_OP_INDICATION);
+
+ prim->u.sms.sms = *sms;
+ dispatch(ms, prim);
+}
+
+void mobile_prim_ntfy_sms_status(struct osmocom_ms *ms, struct gsm_sms *sms, uint8_t cause)
+{
+ struct mobile_prim *prim = mobile_prim_alloc(PRIM_MOB_SMS, PRIM_OP_INDICATION);
+
+ prim->u.sms.sms = *sms;
+ prim->u.sms.cause_valid = true;
+ prim->u.sms.cause = cause;
+ dispatch(ms, prim);
+}
+
static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_param *param)
{
struct timer_closure *closure;