[PATCH] osmo-bsc[master]: paging: fix paging attemt rate counter

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/.

dexter gerrit-no-reply at lists.osmocom.org
Fri Feb 23 17:01:08 UTC 2018


Review at  https://gerrit.osmocom.org/6860

paging: fix paging attemt rate counter

The rate counter BSC_CTR_PAGING_ATTEMPTED does not increment when
a paging request is sent to the BSC. The reson for this is that the
function call to rate_ctr_inc() is located in a dead code section.

- Move the function call to rate_ctr_inc() to osmo_bsc_bssmap.c.
  incremanet on any paging attempt (valid or not) that is recived
  on the A-Interface.

- Remove dead code from paging.c

Change-Id: Iec3eb6724bc655806c3ce3c28448069590d99f91
---
M src/libbsc/paging.c
M src/osmo-bsc/osmo_bsc_bssap.c
2 files changed, 3 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/60/6860/1

diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index 825d31e..43532d1 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -345,44 +345,6 @@
 	return 1;
 }
 
-/*! Receive a new PAGING request from the MSC
- * \param network gsm_network we operate in
- * \param[in] bsub subscriber we want to page
- * \param[in] type type of radio channel we're requirign
- * \param[in] msc MSC which has issue this paging
- * \returns number of BTSs on which we issued the paging */
-int paging_request(struct gsm_network *network, struct bsc_subscr *bsub, int type,
-		   struct bsc_msc_data *msc)
-{
-	struct gsm_bts *bts = NULL;
-	int num_pages = 0;
-
-	rate_ctr_inc(&network->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED]);
-
-	/* start paging subscriber on all BTS within Location Area */
-	do {
-		int rc;
-
-		bts = gsm_bts_by_lac(network, bsub->lac, bts);
-		if (!bts)
-			break;
-
-		rc = paging_request_bts(bts, bsub, type, msc);
-		if (rc < 0) {
-			paging_request_stop(&network->bts_list, NULL, bsub,
-					    NULL, NULL);
-			return rc;
-		}
-		num_pages += rc;
-	} while (1);
-
-	if (num_pages == 0)
-		rate_ctr_inc(&network->bsc_ctrs->ctr[BSC_CTR_PAGING_DETACHED]);
-
-	return num_pages;
-}
-
-
 /*! Stop paging a given subscriber on a given BTS.
  *  If \a conn is non-NULL, we also call the paging call-back function
  *  to notify the paging originator that paging has completed.
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 573625e..17a72d4 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -459,6 +459,9 @@
 	uint8_t chan_needed = RSL_CHANNEED_ANY;
 	uint8_t cell_ident;
 
+	/* Any received BSSMAP paging will count as a paging attempt */
+	rate_ctr_inc(&msc->network->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED]);
+
 	tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l4h + 1, payload_length - 1, 0, 0);
 	remain = payload_length - 1;
 

-- 
To view, visit https://gerrit.osmocom.org/6860
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec3eb6724bc655806c3ce3c28448069590d99f91
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list