Change in osmo-bsc[master]: increment 'paging responded' counter for active paging only

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

Stefan Sperling gerrit-no-reply at lists.osmocom.org
Thu Jun 7 15:16:28 UTC 2018


Stefan Sperling has uploaded this change for review. ( https://gerrit.osmocom.org/9497


Change subject: increment 'paging responded' counter for active paging only
......................................................................

increment 'paging responded' counter for active paging only

Only count paging responses which can be mapped to an active paging.

Unsolicited paging responses which do not correspond to an active paging
would increment the 'paging response' counter. This means the number of
paging attempts could be smaller than the number of paging responses,
which can look confusing in the 'show statistics' VTY command.

Change-Id: I7cfc7c29fb7570d41e3ac23cca17f5b98b303506
Related: OS#66
---
M src/libbsc/paging.c
1 file changed, 12 insertions(+), 8 deletions(-)



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

diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index cdcae51..d6bff2a 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -352,11 +352,12 @@
  * \param[in] bts BTS on which we shall stop paging
  * \param[in] bsub subscriber which we shall stop paging
  * \param[in] conn connection to the subscriber (if any)
- * \param[in] msg message received from subscrbier (if any) */
+ * \param[in] msg message received from subscrbier (if any)
+ * \returns 0 if an active paging request was stopped, an error code otherwise. */
 /* we consciously ignore the type of the request here */
-static void _paging_request_stop(struct gsm_bts *bts, struct bsc_subscr *bsub,
-				 struct gsm_subscriber_connection *conn,
-				 struct msgb *msg)
+static int _paging_request_stop(struct gsm_bts *bts, struct bsc_subscr *bsub,
+				struct gsm_subscriber_connection *conn,
+				struct msgb *msg)
 {
 	struct gsm_bts_paging_state *bts_entry = &bts->paging;
 	struct gsm_paging_request *req, *req2;
@@ -370,9 +371,11 @@
 			paging_remove_request(&bts->paging, req);
 			LOGP(DPAG, LOGL_DEBUG, "(bts=%d) Stop paging %s\n", bts->nr,
 			     bsc_subscr_name(bsub));
-			break;
+			return 0;
 		}
 	}
+
+	return -ENOENT;
 }
 
 /*! Stop paging on all other bts'
@@ -391,9 +394,10 @@
 
 	/* Stop this first and dispatch the request */
 	if (_bts) {
-		_paging_request_stop(_bts, bsub, conn, msg);
-		rate_ctr_inc(&_bts->bts_ctrs->ctr[BTS_CTR_PAGING_RESPONDED]);
-		rate_ctr_inc(&_bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_RESPONDED]);
+		if (_paging_request_stop(_bts, bsub, conn, msg) == 0) {
+			rate_ctr_inc(&_bts->bts_ctrs->ctr[BTS_CTR_PAGING_RESPONDED]);
+			rate_ctr_inc(&_bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_RESPONDED]);
+		}
 	}
 
 	/* Make sure to cancel this everywhere else */

-- 
To view, visit https://gerrit.osmocom.org/9497
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cfc7c29fb7570d41e3ac23cca17f5b98b303506
Gerrit-Change-Number: 9497
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180607/53cd6bcf/attachment.htm>


More information about the gerrit-log mailing list