diff --git a/tester/call_single_tester.c b/tester/call_single_tester.c index 7042346cf..cff0219c2 100644 --- a/tester/call_single_tester.c +++ b/tester/call_single_tester.c @@ -4492,6 +4492,8 @@ static void _call_with_network_switch(bool_t use_ice, bool_t with_socket_refresh if (use_ice){ linphone_core_set_firewall_policy(marie->lc,LinphonePolicyUseIce); linphone_core_set_firewall_policy(pauline->lc,LinphonePolicyUseIce); + linphone_core_manager_wait_for_stun_resolution(marie); + linphone_core_manager_wait_for_stun_resolution(pauline); } if (with_socket_refresh){ lp_config_set_int(linphone_core_get_config(marie->lc), "net", "recreate_sockets_when_network_is_up", 1); diff --git a/tester/message_tester.c b/tester/message_tester.c index 3c49bd180..6abfe697f 100644 --- a/tester/message_tester.c +++ b/tester/message_tester.c @@ -860,6 +860,7 @@ void lime_transfer_message_base(bool_t encrypt_file,bool_t download_file_from_st LinphoneChatMessageCbs *cbs; char *pauline_id, *marie_id; char *filepath; + MSList * msg_list = NULL; marie = linphone_core_manager_new( "marie_rc"); pauline = linphone_core_manager_new( "pauline_tcp_rc"); @@ -909,11 +910,10 @@ void lime_transfer_message_base(bool_t encrypt_file,bool_t download_file_from_st const LinphoneContent* content; if (download_file_from_stored_msg) { LinphoneChatRoom *marie_room = linphone_core_get_chat_room(marie->lc, pauline->identity); - MSList * msgs = linphone_chat_room_get_history(marie_room,1); - BC_ASSERT_PTR_NOT_NULL(msgs); - if (!msgs) goto end; - recv_msg = (LinphoneChatMessage *)msgs->data; - ms_list_free(msgs); + msg_list = linphone_chat_room_get_history(marie_room,1); + BC_ASSERT_PTR_NOT_NULL(msg_list); + if (!msg_list) goto end; + recv_msg = (LinphoneChatMessage *)msg_list->data; } else { recv_msg = marie->stat.last_received_chat_message; } @@ -928,6 +928,7 @@ void lime_transfer_message_base(bool_t encrypt_file,bool_t download_file_from_st BC_ASSERT_PTR_NULL(linphone_content_get_key(content)); linphone_chat_message_download_file(recv_msg); BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneFileTransferDownloadSuccessful,1)); + bctbx_list_free_with_data(msg_list, (bctbx_list_free_func)linphone_chat_message_unref); } BC_ASSERT_EQUAL(pauline->stat.number_of_LinphoneMessageInProgress,2, int, "%d"); // file transfer