fix 'handover:*' counters: add missing / move increments

Move initial 'handover:attempted' counts from bsc_subscr_conn_fsm.c to
handover_fsm.c, where all the other counters are handled.

Add missing increments for the overall 'handover:*' counts.

Related: OS#4736
Change-Id: I783bdedafc0eb8f2df9ea100792846fecc7ccbf7
This commit is contained in:
Neels Hofmeyr 2020-08-29 02:21:36 +00:00
parent 5a7d01792c
commit c859ef646c
2 changed files with 4 additions and 7 deletions

View File

@ -382,13 +382,6 @@ static void gscon_fsm_active(struct osmo_fsm_inst *fi, uint32_t event, void *dat
return;
case GSCON_EV_HANDOVER_START:
bts = conn_get_bts(conn);
rate_ctr_inc(&conn->network->bsc_ctrs->ctr[BSC_CTR_HANDOVER_ATTEMPTED]);
if (bts)
rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_HANDOVER_ATTEMPTED]);
else
rate_ctr_inc(&conn->network->bts_unknown_ctrs->ctr[BTS_CTR_HANDOVER_ATTEMPTED]);
/* Rely on handover_fsm timeout */
if (osmo_fsm_inst_state_chg(fi, ST_HANDOVER, 0, 0))
LOGPFSML(fi, LOGL_ERROR, "Cannot transition to HANDOVER state, discarding\n");

View File

@ -323,6 +323,7 @@ void handover_start(struct handover_out_req *req)
* is to always create a handover_fsm instance, even if the target cell is not resolved yet. Any failure should
* then call handover_end(), which ensures that the conn snaps back to a valid state. */
handover_fsm_alloc(conn);
ho_count(conn_get_bts(conn), CTR_HANDOVER_ATTEMPTED);
ho->from_hodec_id = req->from_hodec_id;
ho->new_lchan_type = req->new_lchan_type == GSM_LCHAN_NONE ?
@ -629,6 +630,7 @@ void handover_start_inter_bsc_in(struct gsm_subscriber_connection *conn,
break;
}
ho_count(ho->new_bts, CTR_HANDOVER_ATTEMPTED);
ho_count(ho->new_bts, CTR_INTER_BSC_HO_IN_ATTEMPTED);
if (!ho->new_bts) {
@ -919,7 +921,9 @@ void handover_end(struct gsm_subscriber_connection *conn, enum handover_result r
if (hdc && hdc->on_handover_end)
hdc->on_handover_end(conn, result);
ho_count_bsc(result_counter_BSC_HANDOVER(result));
ho_count_bsc(result_counter_bsc(ho->scope, result));
ho_count_bts(bts, result_counter_BTS_HANDOVER(result));
ho_count_bts(bts, result_counter_bts(ho->scope, result));
LOG_HO(conn, LOGL_INFO, "Result: %s\n", handover_result_name(result));