mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-23 16:48:32 +00:00
fix(tester): reset counters in core manager uninit + clean dtmf list received
This commit is contained in:
parent
90ca06096c
commit
360077ec86
2 changed files with 5 additions and 3 deletions
|
|
@ -22,9 +22,7 @@
|
|||
void dtmf_received(LinphoneCore *lc, LinphoneCall *call, int dtmf) {
|
||||
stats* counters = get_stats(lc);
|
||||
char** dst = &counters->dtmf_list_received;
|
||||
*dst = *dst ?
|
||||
ms_strcat_printf(*dst, "%c", dtmf)
|
||||
: ms_strdup_printf("%c", dtmf);
|
||||
*dst = *dst ? ms_strcat_printf(*dst, "%c", dtmf) : ms_strdup_printf("%c", dtmf);
|
||||
counters->dtmf_count++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,6 +107,8 @@ static void auth_info_requested(LinphoneCore *lc, const char *realm, const char
|
|||
void reset_counters( stats* counters) {
|
||||
if (counters->last_received_chat_message) linphone_chat_message_unref(counters->last_received_chat_message);
|
||||
if (counters->last_received_info_message) linphone_info_message_unref(counters->last_received_info_message);
|
||||
if (counters->dtmf_list_received) bctbx_free(counters->dtmf_list_received);
|
||||
|
||||
memset(counters,0,sizeof(stats));
|
||||
}
|
||||
|
||||
|
|
@ -504,6 +506,8 @@ void linphone_core_manager_uninit(LinphoneCoreManager *mgr) {
|
|||
if (mgr->cbs)
|
||||
linphone_core_cbs_unref(mgr->cbs);
|
||||
|
||||
reset_counters(&mgr->stat);
|
||||
|
||||
manager_count--;
|
||||
linphone_core_set_log_level_mask(old_log_level);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue