laforge has uploaded this change for review.

View Change

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
---
M src/osmo-bsc/smscb.c
1 file changed, 8 insertions(+), 6 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/61/27961/1
diff --git a/src/osmo-bsc/smscb.c b/src/osmo-bsc/smscb.c
index a11ca0f..8d92b5e 100644
--- a/src/osmo-bsc/smscb.c
+++ b/src/osmo-bsc/smscb.c
@@ -538,14 +538,16 @@
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_setup(&bts->etws.timer, etws_pn_cb, bts);
- 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_setup(&bts->etws.timer, etws_pn_cb, bts);
+ 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.

To view, visit change 27961. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I448be9fd75b87c1f7333a5bfa4f6ba238569fdc3
Gerrit-Change-Number: 27961
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-MessageType: newchange