[SMF] Fix metric bearers_active

Metric 'bearers_active' was incremented in only one code path
(smf_bearer_add() for 4G only), while it was decremented from two paths
(smf_bearer_remove() for both 4G and 5G).
Increment metric also for 5G path (smf_qos_flow_add()), so it won't get
decremented into negative values.
This commit is contained in:
Bostjan Meglic 2022-12-16 10:45:52 +00:00 committed by Sukchan Lee
parent b56c33479e
commit 38aadb77e0
1 changed files with 1 additions and 0 deletions

View File

@ -2030,6 +2030,7 @@ smf_bearer_t *smf_qos_flow_add(smf_sess_t *sess)
ogs_list_add(&sess->bearer_list, qos_flow);
smf_metrics_inst_by_5qi_add(&sess->plmn_id, &sess->s_nssai,
sess->session.qos.index, SMF_METR_GAUGE_SM_QOSFLOWNBR, 1);
smf_metrics_inst_global_inc(SMF_METR_GLOB_GAUGE_BEARERS_ACTIVE);
return qos_flow;
}