This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16873 ) Change subject: libmsc: SMS, Avoid premature RP-ACK to MS ...................................................................... libmsc: SMS, Avoid premature RP-ACK to MS There was one libmsc commit to openbsc that was thus far missing in osmo-msc. This commit completes the work on delayed response from an ESME. Without this patch, the SMR sends an RP-ACK to the mobile station, and subsequently a DELIVER_SM_REPONSE from the ESME provokes either a second RP-ACK, or an RP-ERROR; both of which result in "unhandled at this state (IDLE)" from the SMR After this patch, we have two things corrected: 1) RP-ERROR respects Deliver-SM error cause. 2) No more "unhandled as this state" error from the SMR Extract from original commit message: -------- libmsc: annotate esme route in the sms object from deliver_to_esme() Annotate this esme route, so we can use it to return -EINPROGRESS to skip sending premature RP-ACK to the mobile station, in case we're handling sms routes through SMPP. -------- Fixes: #OS4351 Change-Id: Ic34d398e0a850856e20380ae35e5c2ae5e3c539b --- M src/libmsc/gsm_04_11.c M src/libmsc/smpp_openbsc.c 2 files changed, 12 insertions(+), 2 deletions(-) Approvals: keith: Looks good to me, approved pespin: Looks good to me, approved fixeria: Verified Jenkins Builder: Verified diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index ae19b27..5c26929 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -629,6 +629,10 @@ rc = sms_route_mt_sms(trans, gsms); + /* This SMS got routed through SMPP and we are waiting on the response. */ + if (gsms->smpp.esme) { + return -EINPROGRESS; + } /* * This SMS got routed through SMPP or no receiver exists. * In any case, we store it in the database for further processing. @@ -717,8 +721,10 @@ return gsm411_send_rp_ack(trans, rph->msg_ref); else if (rc > 0) return gsm411_send_rp_error(trans, rph->msg_ref, rc); - else - return rc; + else if (rc == -EINPROGRESS) + rc = 0; + + return rc; } /* Receive a 04.11 RP-DATA message in accordance with Section 7.3.1.2 */ diff --git a/src/libmsc/smpp_openbsc.c b/src/libmsc/smpp_openbsc.c index 98b3b53..a79b252 100644 --- a/src/libmsc/smpp_openbsc.c +++ b/src/libmsc/smpp_openbsc.c @@ -773,6 +773,10 @@ if (ret < 0) return ret; + OSMO_ASSERT(!sms->smpp.esme); + smpp_esme_get(esme); + sms->smpp.esme = esme; + return smpp_cmd_enqueue(esme, vsub, sms, deliver.sequence_number); } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16873 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ic34d398e0a850856e20380ae35e5c2ae5e3c539b Gerrit-Change-Number: 16873 Gerrit-PatchSet: 4 Gerrit-Owner: keith <keith at rhizomatica.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pablo Neira Ayuso <pablo at gnumonks.org> Gerrit-Reviewer: fixeria <axilirator at gmail.com> Gerrit-Reviewer: keith <keith at rhizomatica.org> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200115/c035942f/attachment.htm>