diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-12-24 16:06:33 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-12-24 16:07:40 +0100 |
commit | a29e43a26fae23d5132461cf7bfa43a1ca64761f (patch) | |
tree | 82f893561e7a5c55391f436985f5595a88d468e9 /openbsc/src/gsm_04_08.c | |
parent | 75e2defc7f15b4c8e349af090acfdf31973272bf (diff) |
BSC Call Control: Actually implement call statistics
The existing call realated statistics counters apparently were
never used. This introduces a new set of counters, two for the
MO and MT case.
Diffstat (limited to 'openbsc/src/gsm_04_08.c')
-rw-r--r-- | openbsc/src/gsm_04_08.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c index 02854b6fd..42dd1b70e 100644 --- a/openbsc/src/gsm_04_08.c +++ b/openbsc/src/gsm_04_08.c @@ -1759,6 +1759,8 @@ static int gsm48_cc_rx_setup(struct gsm_trans *trans, struct msgb *msg) subscr_name(trans->subscr), trans->subscr->extension, setup.called.number); + counter_inc(trans->subscr->net->stats.call.mo_setup); + /* indicate setup to MNCC */ mncc_recvmsg(trans->subscr->net, trans, MNCC_SETUP_IND, &setup); @@ -1834,6 +1836,8 @@ static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg) new_cc_state(trans, GSM_CSTATE_CALL_PRESENT); + counter_inc(trans->subscr->net->stats.call.mt_setup); + return gsm48_conn_sendmsg(msg, trans->conn, trans); } @@ -2053,6 +2057,7 @@ static int gsm48_cc_rx_connect(struct gsm_trans *trans, struct msgb *msg) } new_cc_state(trans, GSM_CSTATE_CONNECT_REQUEST); + counter_inc(trans->subscr->net->stats.call.mt_connect); return mncc_recvmsg(trans->subscr->net, trans, MNCC_SETUP_CNF, &connect); } @@ -2065,9 +2070,11 @@ static int gsm48_cc_rx_connect_ack(struct gsm_trans *trans, struct msgb *msg) gsm48_stop_cc_timer(trans); new_cc_state(trans, GSM_CSTATE_ACTIVE); + counter_inc(trans->subscr->net->stats.call.mo_connect_ack); memset(&connect_ack, 0, sizeof(struct gsm_mncc)); connect_ack.callref = trans->callref; + return mncc_recvmsg(trans->subscr->net, trans, MNCC_SETUP_COMPL_IND, &connect_ack); } |