diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-11-22 15:42:39 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-11-29 02:54:54 +0700 |
commit | 24e025e3e218e836c1a7c06ee881ac8839db9008 (patch) | |
tree | 91a925daf0adb63155f91502f50793b904d2d801 /include/osmocom/msc/gsm_04_11.h | |
parent | 9bd4fd601a25481bf6163d226bb653929d060282 (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 'include/osmocom/msc/gsm_04_11.h')
-rw-r--r-- | include/osmocom/msc/gsm_04_11.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/osmocom/msc/gsm_04_11.h b/include/osmocom/msc/gsm_04_11.h index 0b9639fcc..a368d4662 100644 --- a/include/osmocom/msc/gsm_04_11.h +++ b/include/osmocom/msc/gsm_04_11.h @@ -27,6 +27,7 @@ struct sms_deliver { uint8_t *smsc; }; +struct gsm_network; struct msgb; int gsm0411_rcv_sms(struct gsm_subscriber_connection *conn, struct msgb *msg); @@ -37,9 +38,8 @@ struct gsm_sms *sms_from_text(struct vlr_subscr *receiver, const char *sender_msisdn, int dcs, const char *text); -int gsm411_send_sms_subscr(struct vlr_subscr *vsub, - struct gsm_sms *sms); -int gsm411_send_sms(struct gsm_subscriber_connection *conn, +int gsm411_send_sms(struct gsm_network *net, + struct vlr_subscr *vsub, struct gsm_sms *sms); void gsm411_sapi_n_reject(struct gsm_subscriber_connection *conn); |