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/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgHello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/551 to look at the new patch set (#7). sms: change rp err cause of smpp_try_deliver errors smpp_try_deliver could fail with rc < 0. In such cases don't send the MS the rp error sms rejected (cause 21). A rejected message should not be sent again. The spec 04 11 recommends sending cause 41 Temporary failure in unknown cases. Add also a log message and rate counter for such cases. Tweaked-By: Neels Hofmeyr <nhofmeyr at sysmocom.de> Change-Id: Ia03e50ce2bd9a7d1054cc5a6000fd73bd3497c03 --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libmsc/gsm_04_11.c 2 files changed, 15 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/51/551/7 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index daa5a4d..939e0ee 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -198,6 +198,7 @@ MSC_CTR_SMS_DELIVERED, MSC_CTR_SMS_RP_ERR_MEM, MSC_CTR_SMS_RP_ERR_OTHER, + MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR, MSC_CTR_CALL_MO_SETUP, MSC_CTR_CALL_MO_CONNECT_ACK, MSC_CTR_CALL_MT_SETUP, @@ -216,6 +217,7 @@ [MSC_CTR_SMS_DELIVERED] = {"sms.delivered", "Global SMS Deliver attempts."}, [MSC_CTR_SMS_RP_ERR_MEM] = {"sms.rp_err_mem", "CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt."}, [MSC_CTR_SMS_RP_ERR_OTHER] = {"sms.rp_err_other", "Other error of MS responses on a sms delive attempt."}, + [MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR] = {"sms.deliver_unknown_error", "Unknown error occured during sms delivery."}, /* FIXME: count also sms delivered */ [MSC_CTR_CALL_MO_SETUP] = {"call.mo_setup", "Received setup requests from a MS to init a MO call."}, [MSC_CTR_CALL_MO_CONNECT_ACK] = {"call.mo_connect_ack", "Received a connect ack from MS of a MO call. Call is now succesful connected up."}, diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c index 6d3f41b..d1fdfb9 100644 --- a/openbsc/src/libmsc/gsm_04_11.c +++ b/openbsc/src/libmsc/gsm_04_11.c @@ -40,6 +40,7 @@ #include <osmocom/gsm/gsm_utils.h> #include <osmocom/gsm/gsm0411_utils.h> +#include <osmocom/gsm/protocol/gsm_04_11.h> #include <openbsc/debug.h> #include <openbsc/gsm_data.h> @@ -294,8 +295,12 @@ if (rc == 1) goto try_local; if (rc < 0) { - rc = 21; /* cause 21: short message transfer rejected */ - /* FIXME: handle the error somehow? */ + LOGP(DLSMS, LOGL_ERROR, "%s: SMS delivery error: %d.", + subscr_name(conn->subscr), rc); + rc = GSM411_RP_CAUSE_MO_TEMP_FAIL; + /* rc will be logged by gsm411_send_rp_error() */ + rate_ctr_inc(&conn->bts->network->msc_ctrs->ctr[ + MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR]); } return rc; } @@ -319,8 +324,12 @@ rc = 1; /* cause 1: unknown subscriber */ rate_ctr_inc(&conn->bts->network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); } else if (rc < 0) { - rc = 21; /* cause 21: short message transfer rejected */ - /* FIXME: handle the error somehow? */ + LOGP(DLSMS, LOGL_ERROR, "%s: SMS delivery error: %d.", + subscr_name(conn->subscr), rc); + rc = GSM411_RP_CAUSE_MO_TEMP_FAIL; + /* rc will be logged by gsm411_send_rp_error() */ + rate_ctr_inc(&conn->bts->network->msc_ctrs->ctr[ + MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR]); } #else rc = 1; /* cause 1: unknown subscriber */ -- To view, visit https://gerrit.osmocom.org/551 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia03e50ce2bd9a7d1054cc5a6000fd73bd3497c03 Gerrit-PatchSet: 7 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus <lynxis at fe80.eu> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Holger Freyther <holger at freyther.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>