aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/handover_logic.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2009-12-22 00:41:05 +0100
committerHarald Welte <laforge@netfilter.org>2009-12-22 00:41:05 +0100
commit24ff6ee0a343d46823771b9a86e867780eb2099b (patch)
tree2c8bd4dd014f9a851cbe1de9da39b4389ae6ccca /openbsc/src/handover_logic.c
parenta992a36d5f9e7a2d1bb7948784c69ea2e342b7d3 (diff)
keep some internal statistics inside OpenBSC
the statistics will give us some idea about the network load and performance.
Diffstat (limited to 'openbsc/src/handover_logic.c')
-rw-r--r--openbsc/src/handover_logic.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsc/src/handover_logic.c b/openbsc/src/handover_logic.c
index 94d3d0d1..393b0f2a 100644
--- a/openbsc/src/handover_logic.c
+++ b/openbsc/src/handover_logic.c
@@ -97,9 +97,12 @@ int bsc_handover_start(struct gsm_lchan *old_lchan, struct gsm_bts *bts)
DEBUGP(DHO, "(old_lchan on BTS %u, new BTS %u)\n",
old_lchan->ts->trx->bts->nr, bts->nr);
+ bts->network->stats.handover.attempted++;
+
new_lchan = lchan_alloc(bts, old_lchan->type);
if (!new_lchan) {
LOGP(DHO, LOGL_NOTICE, "No free channel\n");
+ bts->network->stats.handover.no_channel++;
return -ENOSPC;
}
@@ -143,6 +146,7 @@ static void ho_T3103_cb(void *_ho)
struct bsc_handover *ho = _ho;
DEBUGP(DHO, "HO T3103 expired\n");
+ ho->new_lchan->ts->trx->bts->network->stats.handover.timeout++;
lchan_free(ho->new_lchan);
llist_del(&ho->list);
@@ -211,6 +215,8 @@ static int ho_gsm48_ho_compl(struct gsm_lchan *new_lchan)
return -ENODEV;
}
+ new_lchan->ts->trx->bts->network->stats.handover.completed++;
+
bsc_del_timer(&ho->T3103);
/* update lchan pointer of transaction */
@@ -238,6 +244,8 @@ static int ho_gsm48_ho_fail(struct gsm_lchan *old_lchan)
return -ENODEV;
}
+ old_lchan->ts->trx->bts->network->stats.handover.failed++;
+
bsc_del_timer(&ho->T3103);
llist_del(&ho->list);
put_lchan(ho->new_lchan);