From 1e67fea7ba5c6336066b78f98a28ab33b05c36c4 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Mon, 22 Jan 2018 18:33:42 +0100 Subject: [PATCH] Accept SMS for any receiver Accept any SMS and store it in the database, even if the receiver of the message cannot be determined when the message arrives at the MSC. This fixes https://osmocom.org/issues/2354 ("SMSC: Store&Forward not working for subscribed but unregistered MS"). Change-Id: I833c3abd290d2bc5fceec7457e3933c9600e6c24 Depends: Icd6093b7b5d8db84b19a0aa47c68182566113ee2 Depends: I56cbe716e52b679c4b94f6cbb4a171306975be2e Depends: Icf786f9b1efabfe7407fb6414ec0d326d8f7244a Related: OS#2354 --- src/libmsc/gsm_04_11.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index a6e8bf793..f178fd31a 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -517,9 +517,10 @@ static int gsm340_rx_tpdu(struct gsm_trans *trans, struct msgb *msg, rc = sms_route_mt_sms(conn, gsms); - /* This SMS got routed through SMPP or no receiver exists. */ - if (!gsms->receiver) - return rc; + /* + * This SMS got routed through SMPP or no receiver exists. + * In any case, we store it in the database for further processing. + */ switch (sms_mti) { case GSM340_SMS_SUBMIT_MS2SC: