diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-05-12 05:38:41 +0700 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-05-19 07:34:35 +0000 |
commit | 643270f7179d31cc4d8b60733007f488aa9becdc (patch) | |
tree | e8695d520a75feca6b2a235ee5a31fa41b3cbc5d /src/libmsc/gsm_04_11_gsup.c | |
parent | c9ba754235cbe2cb59272b180888231d55a85404 (diff) |
libmsc/gsm_04_11.c: properly handle MMTS indication
According to 3GPP TS 29.002, section 7.6.8.7, MMS (More Messages to Send)
is an optional IE of MT-ForwardSM-Req message which is used by SMSC to
indicate that there are more (multi-part) MT SMS messages to be sent.
The MSC needs to use this indication in order to decide whether to
keep the RAN connection with a given subscriber open.
Related Change-Id: (TTCN) I6308586a70c4fb3254c519330a61a9667372149f
Change-Id: Ic46b04913b2e8cc5d11a39426dcc1bfe11f1d31e
Related: OS#3587
Diffstat (limited to 'src/libmsc/gsm_04_11_gsup.c')
-rw-r--r-- | src/libmsc/gsm_04_11_gsup.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libmsc/gsm_04_11_gsup.c b/src/libmsc/gsm_04_11_gsup.c index 9f5175b3a..a1ec634f7 100644 --- a/src/libmsc/gsm_04_11_gsup.c +++ b/src/libmsc/gsm_04_11_gsup.c @@ -234,6 +234,7 @@ static int gsm411_gsup_mt_handler(struct vlr_subscr *vsub, const struct osmo_gsup_message *gsup_msg) { struct gsm_network *net; + bool sm_rp_mmts_ind; int rc; /* Obtain required pointers */ @@ -267,10 +268,17 @@ static int gsm411_gsup_mt_handler(struct vlr_subscr *vsub, if (gsup_msg->sm_rp_oa_type != OSMO_GSUP_SMS_SM_RP_ODA_SMSC_ADDR) goto msg_error; + /* MMS (More Messages to Send) IE is optional */ + if (gsup_msg->sm_rp_mms) + sm_rp_mmts_ind = *gsup_msg->sm_rp_mms > 0; + else + sm_rp_mmts_ind = false; + /* Send RP-DATA */ rc = gsm411_send_rp_data(net, vsub, gsup_msg->sm_rp_oa_len, gsup_msg->sm_rp_oa, - gsup_msg->sm_rp_ui_len, gsup_msg->sm_rp_ui); + gsup_msg->sm_rp_ui_len, gsup_msg->sm_rp_ui, + sm_rp_mmts_ind); if (rc) { LOGP(DLSMS, LOGL_NOTICE, "Failed to send MT SMS, " "ignoring MT-forwardSM-Req message...\n"); |