diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-17 18:29:42 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-17 18:29:42 +0800 |
commit | 8330c1c386b5a2ec78124316508c3a94bdf763d3 (patch) | |
tree | d93cd77332a9d9b8e939707394c63161c1c6e303 /openbsc/src/nat/bsc_mgcp_utils.c | |
parent | b2c38ebb1f2e9f670b3a59caca9e6195277b62be (diff) |
nat: Count the number of dropped SCCP and MGCP calls as well.
Count the number of dropped calls and lost SCCP connections
due the loss of a connection to the BSC...
Diffstat (limited to 'openbsc/src/nat/bsc_mgcp_utils.c')
-rw-r--r-- | openbsc/src/nat/bsc_mgcp_utils.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_mgcp_utils.c b/openbsc/src/nat/bsc_mgcp_utils.c index 5d24acfe3..ef55f8a3f 100644 --- a/openbsc/src/nat/bsc_mgcp_utils.c +++ b/openbsc/src/nat/bsc_mgcp_utils.c @@ -546,13 +546,21 @@ int bsc_mgcp_nat_init(struct bsc_nat *nat) void bsc_mgcp_clear_endpoints_for(struct bsc_connection *bsc) { + struct rate_ctr *ctr = NULL; int i; + + if (bsc->cfg) + ctr = &bsc->cfg->stats.ctrg->ctr[BCFG_CTR_DROPPED_CALLS]; + for (i = 1; i < bsc->nat->mgcp_cfg->number_endpoints; ++i) { struct bsc_endpoint *bsc_endp = &bsc->nat->bsc_endpoints[i]; if (bsc_endp->bsc != bsc) continue; + if (ctr) + rate_ctr_inc(ctr); + bsc_mgcp_free_endpoint(bsc->nat, i); mgcp_free_endp(&bsc->nat->mgcp_cfg->endpoints[i]); } |