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/.
Keith Whyte gerrit-no-reply at lists.osmocom.orgKeith Whyte has uploaded this change for review. ( https://gerrit.osmocom.org/12602 Change subject: Don't deliver alert notification to ESME not bound for RX ...................................................................... Don't deliver alert notification to ESME not bound for RX Change-Id: I0e5d55d3fb6ac46d253902df2fe304e1b0fc8bbf --- M openbsc/src/libmsc/smpp_openbsc.c M openbsc/src/libmsc/smpp_smsc.c M openbsc/src/libmsc/smpp_smsc.h 3 files changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/02/12602/1 diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c index f463e1c..f993480 100644 --- a/openbsc/src/libmsc/smpp_openbsc.c +++ b/openbsc/src/libmsc/smpp_openbsc.c @@ -279,6 +279,12 @@ /* we currently send an alert notification to each ESME that is * connected, and do not require a (non-existant) delivery * pending flag to be set before. */ + + if (!(esme->bind_flags & ESME_BIND_RX)) { + LOGP(DSMPP, LOGL_INFO, + "[%s] is not bound for RX, skipping alert\n", esme->system_id); + continue; + } if (!esme->acl->alert_notifications) { LOGP(DSMPP, LOGL_DEBUG, "[%s] is not set to receive Alert Notifications\n", esme->system_id); diff --git a/openbsc/src/libmsc/smpp_smsc.c b/openbsc/src/libmsc/smpp_smsc.c index 35097b4..1cee3fe 100644 --- a/openbsc/src/libmsc/smpp_smsc.c +++ b/openbsc/src/libmsc/smpp_smsc.c @@ -49,11 +49,6 @@ memset(str, 0, sizeof(*str)); \ rc = smpp34_unpack(type, str, data, len) -enum emse_bind { - ESME_BIND_RX = 0x01, - ESME_BIND_TX = 0x02, -}; - const struct value_string smpp_status_strs[] = { { ESME_ROK, "No Error" }, { ESME_RINVMSGLEN, "Message Length is invalid" }, diff --git a/openbsc/src/libmsc/smpp_smsc.h b/openbsc/src/libmsc/smpp_smsc.h index 2398201..ad1af76 100644 --- a/openbsc/src/libmsc/smpp_smsc.h +++ b/openbsc/src/libmsc/smpp_smsc.h @@ -19,6 +19,11 @@ #define MODE_7BIT 7 #define MODE_8BIT 8 +enum esme_bind { + ESME_BIND_RX = 0x01, + ESME_BIND_TX = 0x02, +}; + enum esme_read_state { READ_ST_IN_LEN = 0, READ_ST_IN_MSG = 1, -- To view, visit https://gerrit.osmocom.org/12602 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0e5d55d3fb6ac46d253902df2fe304e1b0fc8bbf Gerrit-Change-Number: 12602 Gerrit-PatchSet: 1 Gerrit-Owner: Keith Whyte <keith at rhizomatica.org> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190117/3e5c7e6d/attachment.htm>