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
This commit is contained in:
parent
0063752ec5
commit
c9b0b262c3
|
@ -345,44 +345,6 @@ int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub, int type,
|
||||||
return 1;
|
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.
|
/*! Stop paging a given subscriber on a given BTS.
|
||||||
* If \a conn is non-NULL, we also call the paging call-back function
|
* If \a conn is non-NULL, we also call the paging call-back function
|
||||||
* to notify the paging originator that paging has completed.
|
* to notify the paging originator that paging has completed.
|
||||||
|
|
|
@ -522,6 +522,8 @@ static int bssmap_handle_paging(struct bsc_msc_data *msc,
|
||||||
cell_ident = data[0] & 0xf;
|
cell_ident = data[0] & 0xf;
|
||||||
remain -= 1; /* cell ident consumed */
|
remain -= 1; /* cell ident consumed */
|
||||||
|
|
||||||
|
rate_ctr_inc(&msc->network->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED]);
|
||||||
|
|
||||||
switch (cell_ident) {
|
switch (cell_ident) {
|
||||||
case CELL_IDENT_NO_CELL:
|
case CELL_IDENT_NO_CELL:
|
||||||
page_all_bts(msc, tmsi, mi_string, chan_needed);
|
page_all_bts(msc, tmsi, mi_string, chan_needed);
|
||||||
|
|
Loading…
Reference in New Issue