aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/smscb.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2022-04-25 12:03:09 +0200
committerlaforge <laforge@osmocom.org>2022-04-28 13:48:20 +0000
commitbcd0f63dce341878bc3e4e67dd2cb29507ba1f39 (patch)
tree1798e66db39d837632778cc631f52e067c4cf913 /src/osmo-bsc/smscb.c
parent484f535c5091e3ca62547f8bbb6e06844c2ce8ae (diff)
smscb: Always start ETWS timer even in cells without ETWS support
ETWS is sent over both dedicated channels and broadcast channels. Some BTS models may not support the latter, but it is still useful to start the related timer to ensure bts->etws.active gets set to false after the emergency period has concluded. Change-Id: I448be9fd75b87c1f7333a5bfa4f6ba238569fdc3
Diffstat (limited to 'src/osmo-bsc/smscb.c')
-rw-r--r--src/osmo-bsc/smscb.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/osmo-bsc/smscb.c b/src/osmo-bsc/smscb.c
index fc347eb85..208c20353 100644
--- a/src/osmo-bsc/smscb.c
+++ b/src/osmo-bsc/smscb.c
@@ -538,13 +538,15 @@ static void etws_primary_to_bts(struct gsm_bts *bts, const struct osmo_cbsp_writ
if (osmo_bts_has_feature(&bts->features, BTS_FEAT_ETWS_PN)) {
rsl_etws_pn_command(bts, RSL_CHAN_PCH_AGCH, bes->primary, sizeof(bes->primary));
LOG_BTS(bts, DCBS, LOGL_NOTICE, "Sent ETWS Primary Notification via common channel\n");
- if (wrepl->u.emergency.warning_period != 0xffffffff) {
- osmo_timer_schedule(&bts->etws.timer, wrepl->u.emergency.warning_period, 0);
- } else
- LOG_BTS(bts, DCBS, LOGL_NOTICE, "Unlimited ETWS PN broadcast, this breaks "
- "normal network operation due to PCH blockage\n");
} else
LOG_BTS(bts, DCBS, LOGL_ERROR, "BTS doesn't support RSL command for ETWS PN\n");
+
+ /* start the expiration timer, if any */
+ if (wrepl->u.emergency.warning_period != 0xffffffff) {
+ osmo_timer_schedule(&bts->etws.timer, wrepl->u.emergency.warning_period, 0);
+ } else
+ LOG_BTS(bts, DCBS, LOGL_NOTICE, "Unlimited ETWS PN broadcast, this breaks "
+ "normal network operation due to PCH blockage\n");
}
/*! Try to execute a write-replace operation; roll-back if it fails.