aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith <keith@rhizomatica.org>2019-01-17 01:07:53 +0100
committerKeith Whyte <keith@rhizomatica.org>2019-02-28 14:18:29 +0000
commita3a8821167b7b62c17a3002ddbd992eb05e92ab2 (patch)
treecf96b5044716d214243a19d55feb7d9424db3002
parent477cbc6d93bdaf90a7dc0df7f297c31a20f9c4d8 (diff)
Don't deliver alert notifications to ESME not yet bound.
We create a new ESME in smsc->esme_list on establishment of a TCP connection, yet we do not know the system id or anything else, until the ESME identifies and authenticates. So do not send alert notifications until we know the bind status (and system_id) Change-Id: Iec92d4c145ca050c2e212139572eeaae581b99df
-rw-r--r--src/libmsc/smpp_openbsc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libmsc/smpp_openbsc.c b/src/libmsc/smpp_openbsc.c
index fb9b0f832..915644538 100644
--- a/src/libmsc/smpp_openbsc.c
+++ b/src/libmsc/smpp_openbsc.c
@@ -284,6 +284,11 @@ static void alert_all_esme(struct smsc *smsc, struct vlr_subscr *vsub,
/* 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) {
+ LOGP(DSMPP, LOGL_DEBUG,
+ "ESME is not (yet) bound, skipping alert\n");
+ continue;
+ }
if (!esme->acl->alert_notifications) {
LOGP(DSMPP, LOGL_DEBUG,
"[%s] is not set to receive Alert Notifications\n",