From d70c110d81b251e6bb794fc2f841a339d1cd3793 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 22 Sep 2015 23:07:04 +0200 Subject: [PATCH] don't call abort(). abort() is for when there is no hope to be able to continue. --- tester/tester.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tester/tester.c b/tester/tester.c index 8e7908b3d..c9a5bc6fb 100644 --- a/tester/tester.c +++ b/tester/tester.c @@ -370,6 +370,8 @@ void linphone_core_manager_stop(LinphoneCoreManager *mgr){ void linphone_core_manager_destroy(LinphoneCoreManager* mgr) { if (mgr->lc){ const char *record_file=linphone_core_get_record_file(mgr->lc); + int unterminated_calls; + if (!liblinphone_tester_keep_record_files && record_file){ if ((CU_get_number_of_failures()-mgr->number_of_cunit_error_at_creation)>0) { ms_message ("Test has failed, keeping recorded file [%s]",record_file); @@ -377,9 +379,9 @@ void linphone_core_manager_destroy(LinphoneCoreManager* mgr) { unlink(record_file); } } - - if (ms_list_size(mgr->lc->calls) != 0) { - ms_fatal("%s(): There are still %d calls pending, please terminates them before invoking me", __FUNCTION__, ms_list_size(mgr->lc->calls) ); + BC_ASSERT_EQUAL((unterminated_calls=ms_list_size(mgr->lc->calls)), 0, int, "%i"); + if (unterminated_calls != 0) { + ms_error("There are still %d calls pending, please terminates them before invoking linphone_core_manager_destroy().", unterminated_calls); } linphone_core_destroy(mgr->lc); }