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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: paging: Stop all paging if MSC sends us BSSMAP RESET
......................................................................
paging: Stop all paging if MSC sends us BSSMAP RESET
When the MSC has lost its state and issues a RESET, we should not only
clear all ongoing radio connections, but we should also stop any paging.
There's no point in paging a subscriber if the MSC doesn't know about
this paging anymore.
Change-Id: If3f53d3bb66ad2dc02db823cb813590c6b59c700
Closes: OS#2736
---
M include/osmocom/bsc/paging.h
M src/libbsc/paging.c
M src/osmo-bsc/osmo_bsc_bssap.c
3 files changed, 29 insertions(+), 0 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h
index 533f366..2b1bc50 100644
--- a/include/osmocom/bsc/paging.h
+++ b/include/osmocom/bsc/paging.h
@@ -75,4 +75,7 @@
struct bsc_msc_data *paging_get_msc(struct gsm_bts *bts, struct bsc_subscr *bsub);
+void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc);
+void paging_flush_network(struct gsm_network *net, struct bsc_msc_data *msc);
+
#endif
diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index f4679de..8d54d0a 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -467,3 +467,26 @@
return NULL;
}
+
+/*! Flush all paging requests at a given BTS for a given MSC*/
+void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc)
+{
+ struct gsm_paging_request *req, *req2;
+
+ llist_for_each_entry_safe(req, req2, &bts->paging.pending_requests, entry) {
+ if (msc && req->msc != msc)
+ continue;
+ /* now give up the data structure */
+ LOGP(DPAG, LOGL_DEBUG, "Stop paging %s on bts %d (flush).\n", req->bsub->imsi, bts->nr);
+ paging_remove_request(&bts->paging, req);
+ }
+}
+
+/*! Flush all paging requests issued by \a msc on any BTS in \a net */
+void paging_flush_network(struct gsm_network *net, struct bsc_msc_data *msc)
+{
+ struct gsm_bts *bts;
+
+ llist_for_each_entry(bts, &net->bts_list, list)
+ paging_flush_bts(bts, msc);
+}
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 73776ad..051b74e 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -218,6 +218,9 @@
* close all active channels on the BTS side as well */
osmo_bsc_sigtran_reset(msc);
+ /* Drop all ongoing paging requests that this MSC has created on any BTS */
+ paging_flush_network(msc->network, msc);
+
/* Inform the MSC that we have received the reset request and
* that we acted accordingly */
osmo_bsc_sigtran_tx_reset_ack(msc);
--
To view, visit https://gerrit.osmocom.org/5286
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If3f53d3bb66ad2dc02db823cb813590c6b59c700
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder