Commit 360077ec authored by Ronan's avatar Ronan

fix(tester): reset counters in core manager uninit + clean dtmf list received

parent 90ca0609
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment