mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 00:29:21 +00:00
Fix removing one participant tester
This commit is contained in:
parent
fe6d7528f4
commit
3f1d66d104
2 changed files with 21 additions and 2 deletions
|
|
@ -653,7 +653,7 @@ static void eject_from_3_participants_conference(LinphoneCoreManager *marie, Lin
|
|||
BC_ASSERT_TRUE(wait_for_list(lcs,&laure->stat.number_of_LinphoneCallEnd,1,10000));
|
||||
} else {
|
||||
linphone_core_terminate_conference(marie->lc);
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs,&laure->stat.number_of_LinphoneCallEnd,initial_laure_stat.number_of_LinphoneCallEnd+1,3000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs,&laure->stat.number_of_LinphoneCallEnd,initial_laure_stat.number_of_LinphoneCallEnd+2,3000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneCallEnd,initial_marie_stat.number_of_LinphoneCallEnd+3,3000));
|
||||
}
|
||||
|
||||
|
|
@ -832,7 +832,7 @@ test_t multi_call_tests[] = {
|
|||
{ "Unattended call transfer with error", unattended_call_transfer_with_error },
|
||||
{ "Call transfer existing call outgoing call", call_transfer_existing_call_outgoing_call },
|
||||
{ "Simple remote conference", simple_remote_conference },
|
||||
{ "Eject from 3 participants remote conference", eject_from_3_participants_remote_conference }
|
||||
{ "Eject from 3 participants in remote conference", eject_from_3_participants_remote_conference }
|
||||
};
|
||||
|
||||
test_suite_t multi_call_test_suite = {"Multi call", NULL, NULL, liblinphone_tester_before_each, liblinphone_tester_after_each,
|
||||
|
|
|
|||
|
|
@ -700,12 +700,31 @@ void linphone_conference_server_call_state_changed(LinphoneCore *lc, LinphoneCal
|
|||
}
|
||||
}
|
||||
|
||||
void linphone_conference_server_refer_received(LinphoneCore *core, const char *refer_to) {
|
||||
char method[20];
|
||||
LinphoneAddress *refer_to_addr = linphone_address_new(refer_to);
|
||||
char *uri;
|
||||
LinphoneCall *call;
|
||||
|
||||
if(refer_to_addr == NULL) return;
|
||||
strncpy(method, linphone_address_get_method_param(refer_to_addr), sizeof(method));
|
||||
if(strcmp(method, "BYE") == 0) {
|
||||
linphone_address_clean(refer_to_addr);
|
||||
uri = linphone_address_as_string_uri_only(refer_to_addr);
|
||||
call = linphone_core_find_call_from_uri(core, uri);
|
||||
if(call) linphone_core_terminate_call(core, call);
|
||||
ms_free(uri);
|
||||
}
|
||||
linphone_address_destroy(refer_to_addr);
|
||||
}
|
||||
|
||||
LinphoneConferenceServer* linphone_conference_server_new(const char *rc_file) {
|
||||
LinphoneConferenceServer *conf_srv = (LinphoneConferenceServer *)ms_new0(LinphoneConferenceServer, 1);
|
||||
LinphoneCoreManager *lm = (LinphoneCoreManager *)conf_srv;
|
||||
|
||||
conf_srv->vtable = linphone_core_v_table_new();
|
||||
conf_srv->vtable->call_state_changed = linphone_conference_server_call_state_changed;
|
||||
conf_srv->vtable->refer_received = linphone_conference_server_refer_received;
|
||||
conf_srv->vtable->user_data = conf_srv;
|
||||
linphone_core_manager_init(lm, rc_file);
|
||||
linphone_core_add_listener(lm->lc, conf_srv->vtable);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue