Source

Target

Commits (1)
Showing with 504 additions and 38 deletions
This diff is collapsed.
......@@ -61,10 +61,10 @@ void conference_scheduler_invitations_sent(LinphoneConferenceScheduler *schedule
}
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *>
fill_memmber_list(std::list<LinphoneCoreManager *> members,
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> participantList,
LinphoneCoreManager *organizer,
bctbx_list_t *participants_info) {
fill_member_list(std::list<LinphoneCoreManager *> members,
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> participantList,
LinphoneCoreManager *organizer,
bctbx_list_t *participants_info) {
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList;
for (const auto &member : members) {
try {
......@@ -1259,7 +1259,7 @@ void create_conference_base(time_t start_time,
liblinphone_tester_sip_timeout));
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_memmber_list(members, participantList, marie.getCMgr(), participants_info);
fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure, michelle, berthe}, conferenceMgrs, focus.getCMgr(),
memberList, confAddr, enable_video);
......@@ -2457,7 +2457,7 @@ void create_conference_base(time_t start_time,
}
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_memmber_list(members, participantList, marie.getCMgr(), participants_info);
fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure, michelle, berthe}, conferenceMgrs,
focus.getCMgr(), memberList, confAddr, enable_video);
......@@ -2790,7 +2790,7 @@ void create_conference_base(time_t start_time,
liblinphone_tester_sip_timeout));
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_memmber_list(members, participantList, marie.getCMgr(), participants_info);
fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure, michelle, berthe}, conferenceMgrs,
focus.getCMgr(), memberList, confAddr, enable_video);
} else if (participant_list_type == LinphoneConferenceParticipantListTypeClosed) {
......@@ -3575,7 +3575,7 @@ void create_conference_with_late_participant_addition_base(time_t start_time,
BC_ASSERT_PTR_NOT_NULL(fconference);
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_memmber_list(members, participantList, marie.getCMgr(), participants_info);
fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure, michelle, berthe}, conferenceMgrs, focus.getCMgr(),
memberList, confAddr, TRUE);
......@@ -6504,7 +6504,7 @@ void create_simple_conference_merging_calls_base(bool_t enable_ice,
}
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_memmber_list(members, participantList, marie.getCMgr(), participants_info);
fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure}, conferenceMgrs, focus.getCMgr(), memberList,
confAddr, toggle_video);
......
......@@ -487,10 +487,10 @@ void set_video_settings_in_conference(LinphoneCoreManager *focus,
size_t compute_no_video_streams(bool_t enable_video, LinphoneCall *call, LinphoneConference *conference);
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *>
fill_memmber_list(std::list<LinphoneCoreManager *> members,
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> participantList,
LinphoneCoreManager *organizer,
bctbx_list_t *participants_info);
fill_member_list(std::list<LinphoneCoreManager *> members,
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> participantList,
LinphoneCoreManager *organizer,
bctbx_list_t *participants_info);
size_t compute_no_audio_streams(LinphoneCall *call, LinphoneConference *conference);
......
......@@ -251,7 +251,7 @@ static void abort_call_to_ice_conference(void) {
liblinphone_tester_sip_timeout));
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_memmber_list(members, participantList, marie.getCMgr(), participant_infos);
fill_member_list(members, participantList, marie.getCMgr(), participant_infos);
wait_for_conference_streams({focus, marie, pauline, laure}, conferenceMgrs, focus.getCMgr(), memberList,
confAddr, FALSE);
......
......@@ -366,7 +366,7 @@ static void create_conference_dial_out_base(bool_t send_ics,
BC_ASSERT_PTR_NOT_NULL(fconference);
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_memmber_list(members, participantList, marie.getCMgr(), participants_info);
fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure, michelle, berthe}, conferenceMgrs,
focus.getCMgr(), memberList, confAddr, enable_video);
......@@ -1278,7 +1278,7 @@ static void create_simple_conference_dial_out_with_some_calls_declined_base(Linp
BC_ASSERT_PTR_NOT_NULL(fconference);
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_memmber_list(all_active_participants, participantList, marie.getCMgr(), participants_info);
fill_member_list(all_active_participants, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure, michelle, berthe}, conference_members,
focus.getCMgr(), memberList, confAddr, TRUE);
......@@ -2085,7 +2085,7 @@ static void create_conference_dial_out_with_video_activation_and_layout_change(v
BC_ASSERT_PTR_NOT_NULL(fconference);
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_memmber_list(members, participantList, marie.getCMgr(), participants_info);
fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline}, conferenceMgrs, focus.getCMgr(), memberList, confAddr,
TRUE);
......
......@@ -448,7 +448,7 @@ static void create_conference_with_audio_only_participants_base(LinphoneConferen
liblinphone_tester_sip_timeout));
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_memmber_list(members, participantList, marie.getCMgr(), participants_info);
fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure, berthe}, conferenceMgrs, focus.getCMgr(), memberList,
confAddr, TRUE);
......@@ -601,7 +601,7 @@ static void create_conference_with_audio_only_participants_base(LinphoneConferen
conferenceMgrs.push_back(berthe.getCMgr());
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList2 =
fill_memmber_list(members, participantList, marie.getCMgr(), participants_info);
fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure, berthe}, conferenceMgrs, focus.getCMgr(),
memberList2, confAddr, TRUE);
......@@ -814,13 +814,13 @@ static void create_conference_with_audio_only_participants_base(LinphoneConferen
BC_ASSERT_PTR_NULL(conference_call);
const bctbx_list_t *call_logs = linphone_core_get_call_logs(mgr->lc);
BC_ASSERT_EQUAL((unsigned int)bctbx_list_size(call_logs), 1, unsigned int, "%u");
BC_ASSERT_EQUAL(bctbx_list_size(call_logs), 1, size_t, "%zu");
bctbx_list_t *mgr_focus_call_log =
linphone_core_get_call_history_2(mgr->lc, focus.getCMgr()->identity, mgr->identity);
BC_ASSERT_PTR_NOT_NULL(mgr_focus_call_log);
if (mgr_focus_call_log) {
BC_ASSERT_EQUAL((unsigned int)bctbx_list_size(mgr_focus_call_log), 1, unsigned int, "%u");
BC_ASSERT_EQUAL(bctbx_list_size(mgr_focus_call_log), 1, size_t, "%zu");
for (bctbx_list_t *it = mgr_focus_call_log; it; it = bctbx_list_next(it)) {
LinphoneCallLog *call_log = (LinphoneCallLog *)it->data;
BC_ASSERT_TRUE(linphone_call_log_was_conference(call_log));
......@@ -1042,7 +1042,7 @@ static void create_conference_with_codec_mismatch_base(bool_t organizer_codec_mi
}
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_memmber_list(members, participantList, marie.getCMgr(), participants_info);
fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure, michelle, berthe}, conferenceMgrs, focus.getCMgr(),
memberList, confAddr, TRUE);
......@@ -1208,13 +1208,13 @@ static void create_conference_with_codec_mismatch_base(bool_t organizer_codec_mi
for (auto mgr : members) {
const bctbx_list_t *call_logs = linphone_core_get_call_logs(mgr->lc);
BC_ASSERT_EQUAL((unsigned int)bctbx_list_size(call_logs), 1, unsigned int, "%u");
BC_ASSERT_EQUAL(bctbx_list_size(call_logs), 1, size_t, "%zu");
bctbx_list_t *mgr_focus_call_log =
linphone_core_get_call_history_2(mgr->lc, focus.getCMgr()->identity, mgr->identity);
BC_ASSERT_PTR_NOT_NULL(mgr_focus_call_log);
if (mgr_focus_call_log) {
BC_ASSERT_EQUAL((unsigned int)bctbx_list_size(mgr_focus_call_log), 1, unsigned int, "%u");
BC_ASSERT_EQUAL(bctbx_list_size(mgr_focus_call_log), 1, size_t, "%zu");
for (bctbx_list_t *it = mgr_focus_call_log; it; it = bctbx_list_next(it)) {
LinphoneCallLog *call_log = (LinphoneCallLog *)it->data;
BC_ASSERT_TRUE(linphone_call_log_was_conference(call_log));
......@@ -1404,7 +1404,7 @@ static void create_conference_with_server_restart_base(bool_t organizer_first) {
liblinphone_tester_sip_timeout));
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_memmber_list(members, participantList, marie.getCMgr(), participants_info);
fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure}, conferenceMgrs, focus.getCMgr(), memberList,
confAddr, TRUE);
......@@ -1559,13 +1559,13 @@ static void create_conference_with_server_restart_base(bool_t organizer_first) {
BC_ASSERT_PTR_NULL(conference_call);
const bctbx_list_t *call_logs = linphone_core_get_call_logs(mgr->lc);
BC_ASSERT_EQUAL((unsigned int)bctbx_list_size(call_logs), 1, unsigned int, "%u");
BC_ASSERT_EQUAL(bctbx_list_size(call_logs), 1, size_t, "%zu");
bctbx_list_t *mgr_focus_call_log =
linphone_core_get_call_history_2(mgr->lc, focus.getCMgr()->identity, mgr->identity);
BC_ASSERT_PTR_NOT_NULL(mgr_focus_call_log);
if (mgr_focus_call_log) {
BC_ASSERT_EQUAL((unsigned int)bctbx_list_size(mgr_focus_call_log), 1, unsigned int, "%u");
BC_ASSERT_EQUAL(bctbx_list_size(mgr_focus_call_log), 1, size_t, "%zu");
for (bctbx_list_t *it = mgr_focus_call_log; it; it = bctbx_list_next(it)) {
LinphoneCallLog *call_log = (LinphoneCallLog *)it->data;
BC_ASSERT_TRUE(linphone_call_log_was_conference(call_log));
......@@ -1635,6 +1635,8 @@ static void create_simple_conference_with_update_deferred(void) {
std::list<LinphoneCoreManager *> participants{pauline.getCMgr(), laure.getCMgr()};
std::list<LinphoneCoreManager *> members{marie.getCMgr(), pauline.getCMgr(), laure.getCMgr()};
auto conferenceMgrs = members;
conferenceMgrs.push_back(focus.getCMgr());
time_t start_time = ms_time(NULL) + 10;
time_t end_time = (start_time + 300);
......@@ -1654,6 +1656,7 @@ static void create_simple_conference_with_update_deferred(void) {
LinphoneAddress *confAddr = create_conference_on_server(focus, marie, participantList, start_time, end_time,
initialSubject, description, TRUE, security_level);
BC_ASSERT_PTR_NOT_NULL(confAddr);
char *conference_address_str = (confAddr) ? linphone_address_as_string(confAddr) : ms_strdup("<unknown>");
// Chat room creation to send ICS
BC_ASSERT_TRUE(wait_for_list(coresList, &marie.getStats().number_of_LinphoneConferenceStateCreated, 2,
......@@ -1661,6 +1664,7 @@ static void create_simple_conference_with_update_deferred(void) {
for (auto mgr : members) {
LinphoneCallParams *new_params = linphone_core_create_call_params(mgr->lc, nullptr);
ms_message("%s is entering conference %s", linphone_core_get_identity(mgr->lc), conference_address_str);
linphone_core_invite_address_with_params_2(mgr->lc, confAddr, new_params, NULL, nullptr);
linphone_call_params_unref(new_params);
}
......@@ -1717,6 +1721,11 @@ static void create_simple_conference_with_update_deferred(void) {
LinphoneConference *fconference = linphone_core_search_conference_2(focus.getLc(), confAddr);
BC_ASSERT_PTR_NOT_NULL(fconference);
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure}, conferenceMgrs, focus.getCMgr(), memberList,
confAddr, TRUE);
// wait bit more to detect side effect if any
CoreManagerAssert({focus, marie, pauline, laure, michelle}).waitUntil(chrono::seconds(2), [] { return false; });
......@@ -1799,7 +1808,7 @@ static void create_simple_conference_with_update_deferred(void) {
}
// Wait a little bit
wait_for_list(coresList, NULL, 0, 3000);
CoreManagerAssert({focus, marie, pauline, laure, michelle}).waitUntil(chrono::seconds(3), [] { return false; });
LinphoneCall *pauline_call = linphone_core_get_call_by_remote_address2(pauline.getLc(), confAddr);
BC_ASSERT_PTR_NOT_NULL(pauline_call);
......@@ -2039,13 +2048,13 @@ static void create_simple_conference_with_update_deferred(void) {
for (auto mgr : {marie.getCMgr(), pauline.getCMgr(), laure.getCMgr()}) {
const bctbx_list_t *call_logs = linphone_core_get_call_logs(mgr->lc);
BC_ASSERT_EQUAL((unsigned int)bctbx_list_size(call_logs), 1, unsigned int, "%u");
BC_ASSERT_EQUAL(bctbx_list_size(call_logs), 1, size_t, "%zu");
bctbx_list_t *mgr_focus_call_log =
linphone_core_get_call_history_2(mgr->lc, focus.getCMgr()->identity, mgr->identity);
BC_ASSERT_PTR_NOT_NULL(mgr_focus_call_log);
if (mgr_focus_call_log) {
BC_ASSERT_EQUAL((unsigned int)bctbx_list_size(mgr_focus_call_log), 1, unsigned int, "%u");
BC_ASSERT_EQUAL(bctbx_list_size(mgr_focus_call_log), 1, size_t, "%zu");
for (bctbx_list_t *it = mgr_focus_call_log; it; it = bctbx_list_next(it)) {
LinphoneCallLog *call_log = (LinphoneCallLog *)it->data;
BC_ASSERT_TRUE(linphone_call_log_was_conference(call_log));
......@@ -2059,6 +2068,7 @@ static void create_simple_conference_with_update_deferred(void) {
bctbx_list_free_with_data(participants_info, (bctbx_list_free_func)linphone_participant_info_unref);
linphone_address_unref(confAddr);
ms_free(conference_address_str);
bctbx_list_free(coresList);
}
}
......@@ -2315,13 +2325,13 @@ static void change_active_speaker(void) {
BC_ASSERT_PTR_NULL(conference_call);
const bctbx_list_t *call_logs = linphone_core_get_call_logs(mgr->lc);
BC_ASSERT_EQUAL((unsigned int)bctbx_list_size(call_logs), 1, unsigned int, "%u");
BC_ASSERT_EQUAL(bctbx_list_size(call_logs), 1, size_t, "%zu");
bctbx_list_t *mgr_focus_call_log =
linphone_core_get_call_history_2(mgr->lc, focus.getCMgr()->identity, mgr->identity);
BC_ASSERT_PTR_NOT_NULL(mgr_focus_call_log);
if (mgr_focus_call_log) {
BC_ASSERT_EQUAL((unsigned int)bctbx_list_size(mgr_focus_call_log), 1, unsigned int, "%u");
BC_ASSERT_EQUAL(bctbx_list_size(mgr_focus_call_log), 1, size_t, "%zu");
for (bctbx_list_t *it = mgr_focus_call_log; it; it = bctbx_list_next(it)) {
LinphoneCallLog *call_log = (LinphoneCallLog *)it->data;
BC_ASSERT_TRUE(linphone_call_log_was_conference(call_log));
......@@ -2627,7 +2637,7 @@ void uninvited_participant_rejoins(void) {
BC_ASSERT_PTR_NOT_NULL(fconference);
std::map<LinphoneCoreManager *, LinphoneParticipantInfo *> memberList =
fill_memmber_list(members, participantList, marie.getCMgr(), participants_info);
fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure, michelle, berthe}, conferenceMgrs, focus.getCMgr(),
memberList, confAddr, FALSE);
......@@ -2655,7 +2665,7 @@ void uninvited_participant_rejoins(void) {
berthe_stat.number_of_NotifyFullStateReceived + 1,
liblinphone_tester_sip_timeout));
memberList = fill_memmber_list(members, participantList, marie.getCMgr(), participants_info);
memberList = fill_member_list(members, participantList, marie.getCMgr(), participants_info);
wait_for_conference_streams({focus, marie, pauline, laure, michelle, berthe}, conferenceMgrs, focus.getCMgr(),
memberList, confAddr, FALSE);
......