tester: add before_each / after_each methods to check memory leaks and fix various ones

parent ffd02956
......@@ -1502,9 +1502,9 @@ void linphone_call_set_state(LinphoneCall *call, LinphoneCallState cstate, const
LinphoneReason reason = linphone_call_get_reason(call);
char *msg;
if (reason != LinphoneReasonNone) {
msg = ms_strdup(_("Call parameters were successfully modified."));
} else {
msg = ms_strdup_printf(_("Call parameters could not be modified: %s."), linphone_reason_to_string(reason));
} else {
msg = ms_strdup(_("Call parameters were successfully modified."));
}
linphone_core_notify_display_status(lc, msg);
ms_free(msg);
......@@ -3906,7 +3906,7 @@ static void report_bandwidth(LinphoneCall *call, MediaStream *as, MediaStream *v
call->stats[LINPHONE_CALL_STATS_AUDIO].rtcp_upload_bandwidth=(as_active) ? (media_stream_get_rtcp_up_bw(as)*1e-3) : 0;
call->stats[LINPHONE_CALL_STATS_VIDEO].rtcp_download_bandwidth=(vs_active) ? (media_stream_get_rtcp_down_bw(vs)*1e-3) : 0;
call->stats[LINPHONE_CALL_STATS_VIDEO].rtcp_upload_bandwidth=(vs_active) ? (media_stream_get_rtcp_up_bw(vs)*1e-3) : 0;
call->stats[LINPHONE_CALL_STATS_AUDIO].updated|=LINPHONE_CALL_STATS_PERIODICAL_UPDATE;
linphone_core_notify_call_stats_updated(call->core, call, &call->stats[LINPHONE_CALL_STATS_AUDIO]);
call->stats[LINPHONE_CALL_STATS_AUDIO].updated=0;
......@@ -3916,7 +3916,7 @@ static void report_bandwidth(LinphoneCall *call, MediaStream *as, MediaStream *v
linphone_core_notify_call_stats_updated(call->core, call, &call->stats[LINPHONE_CALL_STATS_VIDEO]);
call->stats[LINPHONE_CALL_STATS_VIDEO].updated=0;
update_local_stats(&call->stats[LINPHONE_CALL_STATS_VIDEO], vs);
ms_message( "Bandwidth usage for call [%p]:\n"
"\tRTP audio=[d=%5.1f,u=%5.1f], video=[d=%5.1f,u=%5.1f] kbits/sec\n"
......
......@@ -1315,7 +1315,7 @@ static void ui_config_read(LinphoneCore *lc)
linphone_core_add_friend(lc,lf);
linphone_friend_unref(lf);
}
call_logs_read_from_config_file(lc);
}
......@@ -2476,7 +2476,7 @@ void linphone_core_iterate(LinphoneCore *lc){
time_t current_real_time = ms_time(NULL);
bool_t one_second_elapsed=FALSE;
const char *remote_provisioning_uri = NULL;
if (lc->network_reachable_to_be_notified) {
lc->network_reachable_to_be_notified=FALSE;
linphone_core_notify_network_reachable(lc,lc->network_reachable);
......@@ -3787,6 +3787,7 @@ int linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall *the_call)
{
call = the_call;
}
ms_message("Terminate call [%p] which is currently in state %s", call, linphone_call_state_to_string(call->state));
switch (call->state) {
case LinphoneCallReleased:
case LinphoneCallEnd:
......@@ -5023,7 +5024,7 @@ void linphone_core_set_call_logs_database_path(LinphoneCore *lc, const char *pat
if (path) {
lc->logs_db_file = ms_strdup(path);
linphone_core_call_log_storage_init(lc);
linphone_core_migrate_logs_from_rc_to_db(lc);
}
}
......@@ -5081,7 +5082,7 @@ void linphone_core_migrate_logs_from_rc_to_db(LinphoneCore *lc) {
LpConfig *lpc = NULL;
int original_logs_count, migrated_logs_count;
int i;
#ifndef CALL_LOGS_STORAGE_ENABLED
ms_warning("linphone has been compiled without sqlite, can't migrate call logs");
return;
......@@ -5089,7 +5090,7 @@ void linphone_core_migrate_logs_from_rc_to_db(LinphoneCore *lc) {
if (!lc) {
return;
}
lpc = linphone_core_get_config(lc);
if (!lpc) {
ms_warning("this core has been started without a rc file, nothing to migrate");
......@@ -5099,16 +5100,16 @@ void linphone_core_migrate_logs_from_rc_to_db(LinphoneCore *lc) {
ms_warning("the call logs migration has already been done, skipping...");
return;
}
// This is because there must have been a call previously to linphone_core_call_log_storage_init
// This is because there must have been a call previously to linphone_core_call_log_storage_init
lc->call_logs = ms_list_free_with_data(lc->call_logs, (void (*)(void*))linphone_call_log_unref);
call_logs_read_from_config_file(lc);
if (!lc->call_logs) {
ms_warning("nothing to migrate, skipping...");
return;
}
logs_to_migrate = lc->call_logs;
lc->call_logs = NULL;
// We can't use ms_list_for_each because logs_to_migrate are listed in the wrong order (latest first), and we want to store the logs latest last
......@@ -5123,7 +5124,7 @@ void linphone_core_migrate_logs_from_rc_to_db(LinphoneCore *lc) {
int i = 0;
ms_debug("call logs migration successful: %i logs migrated", ms_list_size(lc->call_logs));
lp_config_set_int(lpc, "misc", "call_logs_migration_done", 1);
for (; i < original_logs_count; i++) {
char logsection[32];
snprintf(logsection, sizeof(logsection), "call_log_%i", i);
......@@ -5132,7 +5133,7 @@ void linphone_core_migrate_logs_from_rc_to_db(LinphoneCore *lc) {
} else {
ms_error("not as many logs saved in db has logs read from rc (%i in rc against %i in db)!", original_logs_count, migrated_logs_count);
}
ms_list_free_with_data(logs_to_migrate, (void (*)(void*))linphone_call_log_unref);
}
......
......@@ -416,7 +416,7 @@ LpConfig *lp_config_new_with_factory(const char *config_filename, const char *fa
lp_config_read_file(lpconfig, factory_config_filename);
}
return lpconfig;
fail:
ms_free(lpconfig);
return NULL;
......@@ -429,6 +429,7 @@ int lp_config_read_file(LpConfig *lpconfig, const char *filename){
ms_message("Reading config information from %s", path);
lp_config_parse(lpconfig,f);
fclose(f);
ms_free(path);
return 0;
}
ms_warning("Fail to open file %s",path);
......@@ -764,12 +765,12 @@ bool_t lp_config_relative_file_exists(const LpConfig *lpconfig, const char *file
char *filepath = ms_strdup_printf("%s/%s", dir, filename);
char *realfilepath = lp_realpath(filepath, NULL);
FILE *file;
ms_free(filename);
ms_free(filepath);
if(realfilepath == NULL) return FALSE;
file = fopen(realfilepath, "r");
ms_free(realfilepath);
if (file) {
......@@ -785,14 +786,14 @@ void lp_config_write_relative_file(const LpConfig *lpconfig, const char *filenam
char *filepath = NULL;
char *realfilepath = NULL;
FILE *file;
if (lpconfig->filename == NULL) return;
if(strlen(data) == 0) {
ms_warning("%s has not been created because there is no data to write", filename);
return;
}
dup_config_file = ms_strdup(lpconfig->filename);
dir = _lp_config_dirname(dup_config_file);
filepath = ms_strdup_printf("%s/%s", dir, filename);
......@@ -801,16 +802,16 @@ void lp_config_write_relative_file(const LpConfig *lpconfig, const char *filenam
ms_error("Could not resolv %s: %s", filepath, strerror(errno));
goto end;
}
file = fopen(realfilepath, "w");
if(file == NULL) {
ms_error("Could not open %s for write", realfilepath);
goto end;
}
fprintf(file, "%s", data);
fclose(file);
end:
ms_free(dup_config_file);
ms_free(filepath);
......@@ -823,9 +824,9 @@ int lp_config_read_relative_file(const LpConfig *lpconfig, const char *filename,
char *filepath = NULL;
FILE *file = NULL;
char* realfilepath = NULL;
if (lpconfig->filename == NULL) return -1;
dup_config_file = ms_strdup(lpconfig->filename);
dir = _lp_config_dirname(dup_config_file);
filepath = ms_strdup_printf("%s/%s", dir, filename);
......@@ -834,19 +835,19 @@ int lp_config_read_relative_file(const LpConfig *lpconfig, const char *filename,
ms_error("Could not resolv %s: %s", filepath, strerror(errno));
goto err;
}
file = fopen(realfilepath, "r");
if(file == NULL) {
ms_error("Could not open %s for read. %s", realfilepath, strerror(errno));
goto err;
}
if(fread(data, 1, max_length, file)<=0) {
ms_error("%s could not be loaded. %s", realfilepath, strerror(errno));
goto err;
}
fclose(file);
ms_free(dup_config_file);
ms_free(filepath);
ms_free(realfilepath);
......
......@@ -904,7 +904,7 @@ char* linphone_proxy_config_normalize_phone_number(LinphoneProxyConfig *proxy, c
ms_free(flatten);
}
}
if (proxy==NULL) ms_free(tmpproxy);
if (proxy==NULL) linphone_proxy_config_destroy(tmpproxy);
return result;
}
......@@ -1494,9 +1494,11 @@ const char* linphone_proxy_config_get_transport(const LinphoneProxyConfig *cfg)
return NULL;
}
if ((route_addr || (route_addr=sal_address_new(addr))) && sal_address_get_transport(route_addr)) {
if (route_addr || (route_addr=sal_address_new(addr))) {
ret=sal_transport_to_string(sal_address_get_transport(route_addr));
if (!linphone_proxy_config_get_service_route(cfg)) sal_address_destroy(route_addr); /*destroy except for service route*/
if (!linphone_proxy_config_get_service_route(cfg)) {
sal_address_destroy(route_addr);
}
}
return ret;
......
......@@ -260,7 +260,7 @@ static void append_metrics_to_buffer(char ** buffer, size_t * size, size_t * off
}
static int send_report(LinphoneCall* call, reporting_session_report_t * report, const char * report_event) {
LinphoneContent *content = linphone_content_new();
LinphoneContent *content;
int expires = -1;
size_t offset = 0;
size_t size = 2048;
......@@ -293,6 +293,7 @@ static int send_report(LinphoneCall* call, reporting_session_report_t * report,
}
buffer = (char *) belle_sip_malloc(size);
content = linphone_content_new();
linphone_content_set_type(content, "application");
linphone_content_set_subtype(content, "vq-rtcpxr");
......
......@@ -76,6 +76,7 @@ void sip_setup_unregister_all(void){
ss->initialized=FALSE;
}
}
registered_sip_setups = ms_list_free(registered_sip_setups);
}
void buddy_lookup_request_set_key(BuddyLookupRequest *req, const char *key){
......
mediastreamer2 @ e4bbeb21
Subproject commit 843ae9c9e37959222dc647f998a5e92bf6f80eaf
Subproject commit e4bbeb2123bd501b90ccfee958a4e20d3eebbf24
......@@ -347,25 +347,22 @@ bool_t call(LinphoneCoreManager* caller_mgr,LinphoneCoreManager* callee_mgr){
}
void end_call(LinphoneCoreManager *m1, LinphoneCoreManager *m2){
int previous_count_1 = m1->stat.number_of_LinphoneCallEnd;
int previous_count_2 = m2->stat.number_of_LinphoneCallEnd;
linphone_core_terminate_all_calls(m1->lc);
BC_ASSERT_TRUE(wait_for(m1->lc,m2->lc,&m1->stat.number_of_LinphoneCallEnd,1));
BC_ASSERT_TRUE(wait_for(m1->lc,m2->lc,&m2->stat.number_of_LinphoneCallEnd,1));
BC_ASSERT_TRUE(wait_for(m1->lc,m2->lc,&m1->stat.number_of_LinphoneCallReleased,1));
BC_ASSERT_TRUE(wait_for(m1->lc,m2->lc,&m2->stat.number_of_LinphoneCallReleased,1));
BC_ASSERT_TRUE(wait_for(m1->lc,m2->lc,&m1->stat.number_of_LinphoneCallEnd,previous_count_1+1));
BC_ASSERT_TRUE(wait_for(m1->lc,m2->lc,&m2->stat.number_of_LinphoneCallEnd,previous_count_2+1));
BC_ASSERT_TRUE(wait_for(m1->lc,m2->lc,&m1->stat.number_of_LinphoneCallReleased,previous_count_1+1));
BC_ASSERT_TRUE(wait_for(m1->lc,m2->lc,&m2->stat.number_of_LinphoneCallReleased,previous_count_2+1));
}
void simple_call_base(bool_t enable_multicast_recv_side) {
int begin;
int leaked_objects;
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
const LinphoneAddress *from;
LinphoneCall *pauline_call;
LinphoneProxyConfig* marie_cfg;
belle_sip_object_enable_leak_detector(TRUE);
begin=belle_sip_object_get_object_count();
marie = linphone_core_manager_new( "marie_rc");
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
......@@ -408,12 +405,6 @@ void simple_call_base(bool_t enable_multicast_recv_side) {
end_call(marie,pauline);
linphone_core_manager_destroy(pauline);
linphone_core_manager_destroy(marie);
leaked_objects=belle_sip_object_get_object_count()-begin;
BC_ASSERT_EQUAL(leaked_objects, 0, int, "%d");
if (leaked_objects>0){
belle_sip_object_dump_active_objects();
}
}
static void simple_call() {
......@@ -421,13 +412,9 @@ static void simple_call() {
}
static void call_with_timeouted_bye(void) {
int begin;
int leaked_objects;
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
belle_sip_timer_config_t timer_config;
belle_sip_object_enable_leak_detector(TRUE);
begin=belle_sip_object_get_object_count();
marie = linphone_core_manager_new( "marie_rc");
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
......@@ -454,12 +441,6 @@ static void call_with_timeouted_bye(void) {
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
leaked_objects=belle_sip_object_get_object_count()-begin;
BC_ASSERT_EQUAL(leaked_objects, 0, int, "%d");
if (leaked_objects>0){
belle_sip_object_dump_active_objects();
}
}
static void direct_call_over_ipv6(){
......@@ -534,6 +515,7 @@ static void call_outbound_with_multiple_proxy() {
// calling marie should go through the second proxy config
BC_ASSERT_TRUE(call(marie, pauline));
end_call(marie, pauline);
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
}
......@@ -624,6 +606,8 @@ static void multiple_answers_call_with_media_relay(void) {
BC_ASSERT_TRUE( wait_for_list(lcs, &marie1->stat.number_of_LinphoneCallStreamsRunning, 1, 2000) );
BC_ASSERT_TRUE( wait_for_list(lcs, &marie2->stat.number_of_LinphoneCallEnd, 1, 2000) );
end_call(marie1, pauline);
end_call(marie2, pauline);
linphone_core_manager_destroy(pauline);
linphone_core_manager_destroy(marie1);
......@@ -1109,6 +1093,7 @@ static void call_with_ice_no_sdp(void){
liblinphone_tester_check_rtcp(marie,pauline);
end_call(pauline, marie);
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
}
......@@ -1998,6 +1983,8 @@ static void _call_with_ice_video(LinphoneVideoPolicy caller_policy, LinphoneVide
BC_ASSERT_TRUE(check_ice(pauline, marie, LinphoneIceStateHostConnection));
}
end_call(pauline, marie);
end:
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
......@@ -3403,14 +3390,9 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone
}
static void accept_call_in_send_base(bool_t caller_has_ice) {
int begin;
int leaked_objects;
LinphoneCoreManager *pauline, *marie;
MSList *lcs=NULL;;
belle_sip_object_enable_leak_detector(TRUE);
begin=belle_sip_object_get_object_count();
marie = linphone_core_manager_new("marie_rc");
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
if (caller_has_ice) {
......@@ -3427,13 +3409,6 @@ static void accept_call_in_send_base(bool_t caller_has_ice) {
ms_free(lcs);
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
leaked_objects=belle_sip_object_get_object_count()-begin;
BC_ASSERT_EQUAL(leaked_objects, 0, int, "%d");
if (leaked_objects>0){
belle_sip_object_dump_active_objects();
}
}
static void accept_call_in_send_only(void) {
......@@ -3445,14 +3420,9 @@ static void accept_call_in_send_only_with_ice(void) {
}
void two_accepted_call_in_send_only() {
int begin;
int leaked_objects;
LinphoneCoreManager *pauline, *marie, *laure;
MSList *lcs=NULL;
belle_sip_object_enable_leak_detector(TRUE);
begin=belle_sip_object_get_object_count();
marie = linphone_core_manager_new("marie_rc");
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
laure = linphone_core_manager_new("laure_rc");
......@@ -3473,14 +3443,6 @@ void two_accepted_call_in_send_only() {
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
linphone_core_manager_destroy(laure);
leaked_objects=belle_sip_object_get_object_count()-begin;
BC_ASSERT_EQUAL(leaked_objects, 0, int, "%d");
if (leaked_objects>0){
belle_sip_object_dump_active_objects();
}
}
#endif
......@@ -3583,6 +3545,7 @@ static void video_call_snapshot(void) {
wait_for_until(marie->lc, pauline->lc, &dummy, 1, 5000);
BC_ASSERT_EQUAL(access(filename, F_OK), 0, int, "%d");
remove(filename);
end_call(marie, pauline);
}
ms_free(filename);
linphone_core_manager_destroy(marie);
......@@ -3592,16 +3555,11 @@ static void video_call_snapshot(void) {
#endif
static void call_with_in_dialog_update(void) {
int begin;
int leaked_objects;
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
LinphoneCallParams *params;
bool_t call_ok;
belle_sip_object_enable_leak_detector(TRUE);
begin=belle_sip_object_get_object_count();
marie = linphone_core_manager_new( "marie_rc");
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
BC_ASSERT_TRUE(call_ok=call(pauline,marie));
......@@ -3621,25 +3579,14 @@ static void call_with_in_dialog_update(void) {
end:
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
leaked_objects=belle_sip_object_get_object_count()-begin;
BC_ASSERT_EQUAL(leaked_objects, 0, int, "%d");
if (leaked_objects>0){
belle_sip_object_dump_active_objects();
}
}
static void call_with_in_dialog_codec_change_base(bool_t no_sdp) {
int begin;
int leaked_objects;
int dummy=0;
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
LinphoneCallParams *params;
bool_t call_ok;
belle_sip_object_enable_leak_detector(TRUE);
begin=belle_sip_object_get_object_count();
marie = linphone_core_manager_new( "marie_rc");
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
BC_ASSERT_TRUE(call_ok=call(pauline,marie));
......@@ -3670,12 +3617,6 @@ static void call_with_in_dialog_codec_change_base(bool_t no_sdp) {
end:
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
leaked_objects=belle_sip_object_get_object_count()-begin;
BC_ASSERT_EQUAL(leaked_objects, 0, int, "%d");
if (leaked_objects>0){
belle_sip_object_dump_active_objects();
}
}
static void call_with_in_dialog_codec_change(void) {
call_with_in_dialog_codec_change_base(FALSE);
......@@ -3684,17 +3625,12 @@ static void call_with_in_dialog_codec_change_no_sdp(void) {
call_with_in_dialog_codec_change_base(TRUE);
}
static void call_with_custom_supported_tags(void) {
int begin;
int leaked_objects;
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
const LinphoneCallParams *remote_params;
const char *recv_supported;
bool_t call_ok;
belle_sip_object_enable_leak_detector(TRUE);
begin=belle_sip_object_get_object_count();
marie = linphone_core_manager_new( "marie_rc");
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
......@@ -3712,12 +3648,6 @@ static void call_with_custom_supported_tags(void) {
end:
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
leaked_objects=belle_sip_object_get_object_count()-begin;
BC_ASSERT_EQUAL(leaked_objects, 0, int, "%d");
if (leaked_objects>0){
belle_sip_object_dump_active_objects();
}
}
static void call_log_from_taken_from_p_asserted_id(void) {
......@@ -3882,16 +3812,11 @@ static void outgoing_reinvite_with_invalid_ack_sdp() {
static void call_with_paused_no_sdp_on_resume() {
int begin;
int leaked_objects;
int dummy=0;
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
LinphoneCall* call_marie = NULL;
belle_sip_object_enable_leak_detector(TRUE);
begin=belle_sip_object_get_object_count();
marie = linphone_core_manager_new( "marie_rc");
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
BC_ASSERT_TRUE(call(pauline,marie));
......@@ -3931,12 +3856,6 @@ end:
end_call(marie,pauline);
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
leaked_objects=belle_sip_object_get_object_count()-begin;
BC_ASSERT_EQUAL(leaked_objects, 0, int, "%d");
if (leaked_objects>0){
belle_sip_object_dump_active_objects();
}
}
static void early_media_without_sdp_in_200_base( bool_t use_video, bool_t use_ice ){
......@@ -4027,17 +3946,12 @@ static void call_with_early_media_ice_and_no_sdp_in_200(){
}
static void call_with_generic_cn(void) {
int begin;
int leaked_objects;
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
LinphoneCall *pauline_call;
char *audio_file_with_silence=bc_tester_res("sounds/ahbahouaismaisbon.wav");
char *recorded_file=bc_tester_file("result.wav");
belle_sip_object_enable_leak_detector(TRUE);
begin=belle_sip_object_get_object_count();
marie = linphone_core_manager_new( "marie_rc");
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
......@@ -4076,11 +3990,6 @@ static void call_with_generic_cn(void) {
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
leaked_objects=belle_sip_object_get_object_count()-begin;
BC_ASSERT_EQUAL(leaked_objects, 0, int, "%d");
if (leaked_objects>0){
belle_sip_object_dump_active_objects();
}
ms_free(audio_file_with_silence);
ms_free(recorded_file);
}
......@@ -4109,14 +4018,10 @@ void static call_state_changed_3(LinphoneCore *lc, LinphoneCall *call, LinphoneC
static void call_with_transport_change_base(bool_t succesfull_call) {
int begin;
int leaked_objects;
LCSipTransports sip_tr;
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
LinphoneCoreVTable * v_table;
belle_sip_object_enable_leak_detector(TRUE);
begin=belle_sip_object_get_object_count();
v_table = linphone_core_v_table_new();
v_table->call_state_changed=call_state_changed_2;
marie = linphone_core_manager_new("marie_rc");
......@@ -4146,13 +4051,6 @@ static void call_with_transport_change_base(bool_t succesfull_call) {
}
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
leaked_objects=belle_sip_object_get_object_count()-begin;
BC_ASSERT_EQUAL(leaked_objects,0,int,"%d");
if (leaked_objects>0){
belle_sip_object_dump_active_objects();
}
}
static void call_with_transport_change_after_released(void) {
call_with_transport_change_base(TRUE);
......@@ -4163,17 +4061,12 @@ static void unsucessfull_call_with_transport_change_after_released(void) {
#ifdef VIDEO_ENABLED
static void video_call_with_re_invite_inactive_followed_by_re_invite_base(LinphoneMediaEncryption mode, bool_t no_sdp) {
int begin;
int leaked_objects;
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
LinphoneCallParams *params;