aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/msc_vty.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-11-22 15:42:39 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-11-29 02:54:54 +0700
commit24e025e3e218e836c1a7c06ee881ac8839db9008 (patch)
tree91a925daf0adb63155f91502f50793b904d2d801 /src/libmsc/msc_vty.c
parent9bd4fd601a25481bf6163d226bb653929d060282 (diff)
libmsc/gsm_04_11.c: refactor MT SMS message handling
According to GSM TS 04.11, the SMC (Short Message Control) state machine is a part of CM-sublayer of L3, that is responsible for connection management (establisment and releasing), and SM-RP (Relay Protocol) message delivery. For some reason, the connection establisment request from SMC (GSM411_MMSMS_EST_REQ) was not handled properly - it was always assumed that connection is already established. This is why the code initiating a MT (Mobile Terminated) SMS transfer had to establish a radio connection with subscriber manually. Let's benefit from having the SMC state machine, and offload connection establishment to it. This change makes the local implementation closer to GSM TS 04.11, and facilitates the further integration of GSUP transport. NOTE: the expected unit test output is changed, because now we always allocate a transaction first, and then establish a connection, not vice versa. Change-Id: I4a07ece80d8dd40b23da6bb1ffc9d3d745b54092
Diffstat (limited to 'src/libmsc/msc_vty.c')
-rw-r--r--src/libmsc/msc_vty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index cdf31842b..4f3ac04c7 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -680,7 +680,7 @@ DEFUN(sms_send_pend,
break;
if (sms->receiver)
- gsm411_send_sms_subscr(sms->receiver, sms);
+ gsm411_send_sms(gsmnet, sms->receiver, sms);
sms_id = sms->id + 1;
}
@@ -819,7 +819,7 @@ DEFUN(subscriber_send_pending_sms,
sms = db_sms_get_unsent_for_subscr(vsub, UINT_MAX);
if (sms)
- gsm411_send_sms_subscr(sms->receiver, sms);
+ gsm411_send_sms(gsmnet, sms->receiver, sms);
vlr_subscr_put(vsub);