mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
Replace MSList by bctbx_list_t in tools and tester.
This commit is contained in:
parent
16bb8d78c1
commit
400404fc2a
18 changed files with 423 additions and 423 deletions
|
|
@ -55,7 +55,7 @@ void account_destroy(Account *obj){
|
|||
|
||||
struct _AccountManager{
|
||||
char *unique_id;
|
||||
MSList *accounts;
|
||||
bctbx_list_t *accounts;
|
||||
};
|
||||
|
||||
typedef struct _AccountManager AccountManager;
|
||||
|
|
@ -73,7 +73,7 @@ AccountManager *account_manager_get(void){
|
|||
void account_manager_destroy(void){
|
||||
if (the_am){
|
||||
ms_free(the_am->unique_id);
|
||||
ms_list_free_with_data(the_am->accounts,(void(*)(void*))account_destroy);
|
||||
bctbx_list_free_with_data(the_am->accounts,(void(*)(void*))account_destroy);
|
||||
ms_free(the_am);
|
||||
}
|
||||
the_am=NULL;
|
||||
|
|
@ -81,7 +81,7 @@ void account_manager_destroy(void){
|
|||
}
|
||||
|
||||
Account *account_manager_get_account(AccountManager *m, const LinphoneAddress *identity){
|
||||
MSList *it;
|
||||
bctbx_list_t *it;
|
||||
|
||||
for(it=m->accounts;it!=NULL;it=it->next){
|
||||
Account *a=(Account*)it->data;
|
||||
|
|
@ -208,7 +208,7 @@ LinphoneAddress *account_manager_check_account(AccountManager *m, LinphoneProxyC
|
|||
account=account_new(id_addr,m->unique_id);
|
||||
ms_message("No account for %s exists, going to create one.",identity);
|
||||
create_account=TRUE;
|
||||
m->accounts=ms_list_append(m->accounts,account);
|
||||
m->accounts=bctbx_list_append(m->accounts,account);
|
||||
}
|
||||
/*modify the username of the identity of the proxy config*/
|
||||
linphone_address_set_username(id_addr, linphone_address_get_username(account->modified_identity));
|
||||
|
|
@ -235,7 +235,7 @@ LinphoneAddress *account_manager_check_account(AccountManager *m, LinphoneProxyC
|
|||
}
|
||||
|
||||
void linphone_core_manager_check_accounts(LinphoneCoreManager *m){
|
||||
const MSList *it;
|
||||
const bctbx_list_t *it;
|
||||
AccountManager *am=account_manager_get();
|
||||
|
||||
for(it=linphone_core_get_proxy_config_list(m->lc);it!=NULL;it=it->next){
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ static void call_waiting_indication_with_param(bool_t enable_caller_privacy) {
|
|||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
|
||||
LinphoneCoreManager* laure = linphone_core_manager_new( "laure_rc_udp");
|
||||
MSList *iterator;
|
||||
MSList* lcs;
|
||||
bctbx_list_t *iterator;
|
||||
bctbx_list_t* lcs;
|
||||
LinphoneCall* pauline_called_by_marie;
|
||||
LinphoneCall* pauline_called_by_laure=NULL;
|
||||
LinphoneCallParams *laure_params=linphone_core_create_call_params(laure->lc, NULL);
|
||||
|
|
@ -45,9 +45,9 @@ static void call_waiting_indication_with_param(bool_t enable_caller_privacy) {
|
|||
if (enable_caller_privacy)
|
||||
linphone_call_params_set_privacy(marie_params,LinphonePrivacyId);
|
||||
|
||||
lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
lcs=bctbx_list_append(NULL,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,laure->lc);
|
||||
|
||||
BC_ASSERT_TRUE(call_with_caller_params(marie,pauline,marie_params));
|
||||
linphone_call_params_destroy(marie_params);
|
||||
|
|
@ -72,7 +72,7 @@ static void call_waiting_indication_with_param(bool_t enable_caller_privacy) {
|
|||
,&laure->stat.number_of_LinphoneCallOutgoingRinging
|
||||
,1));
|
||||
|
||||
for (iterator=(MSList *)linphone_core_get_calls(pauline->lc);iterator!=NULL;iterator=iterator->next) {
|
||||
for (iterator=(bctbx_list_t *)linphone_core_get_calls(pauline->lc);iterator!=NULL;iterator=iterator->next) {
|
||||
LinphoneCall *call=(LinphoneCall *)iterator->data;
|
||||
if (call != pauline_called_by_marie) {
|
||||
/*fine, this is the call waiting*/
|
||||
|
|
@ -104,7 +104,7 @@ static void call_waiting_indication_with_param(bool_t enable_caller_privacy) {
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
linphone_core_manager_destroy(laure);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
static void call_waiting_indication(void) {
|
||||
call_waiting_indication_with_param(FALSE);
|
||||
|
|
@ -177,13 +177,13 @@ static void incoming_call_accepted_when_outgoing_call_in_state(LinphoneCallState
|
|||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
|
||||
LinphoneCoreManager* laure = linphone_core_manager_new( "laure_rc_udp");
|
||||
MSList* lcs;
|
||||
bctbx_list_t* lcs;
|
||||
LinphoneCallParams *laure_params=linphone_core_create_call_params(laure->lc, NULL);
|
||||
LinphoneCallParams *marie_params=linphone_core_create_call_params(marie->lc, NULL);
|
||||
|
||||
lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
lcs=bctbx_list_append(NULL,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,laure->lc);
|
||||
|
||||
|
||||
if (state==LinphoneCallOutgoingRinging || state==LinphoneCallOutgoingEarlyMedia) {
|
||||
|
|
@ -229,7 +229,7 @@ static void incoming_call_accepted_when_outgoing_call_in_state(LinphoneCallState
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
linphone_core_manager_destroy(laure);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
static void incoming_call_accepted_when_outgoing_call_in_progress(void) {
|
||||
incoming_call_accepted_when_outgoing_call_in_state(LinphoneCallOutgoingProgress);
|
||||
|
|
@ -250,13 +250,13 @@ static void simple_conference_base(LinphoneCoreManager* marie, LinphoneCoreManag
|
|||
LinphoneCall* pauline_called_by_marie;
|
||||
LinphoneCall* marie_call_laure;
|
||||
LinphoneConference *conference;
|
||||
const MSList* calls;
|
||||
const bctbx_list_t* calls;
|
||||
bool_t is_remote_conf;
|
||||
bool_t focus_is_up = (focus && ((LinphoneConferenceServer *)focus)->reg_state == LinphoneRegistrationOk);
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
if(focus) lcs=ms_list_append(lcs,focus->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,laure->lc);
|
||||
if(focus) lcs=bctbx_list_append(lcs,focus->lc);
|
||||
|
||||
is_remote_conf = (strcmp(lp_config_get_string(marie->lc->config, "misc", "conference_type", "local"), "remote") == 0);
|
||||
if(is_remote_conf) BC_ASSERT_PTR_NOT_NULL(focus);
|
||||
|
|
@ -341,9 +341,9 @@ static void simple_conference_base(LinphoneCoreManager* marie, LinphoneCoreManag
|
|||
|
||||
BC_ASSERT_PTR_NOT_NULL(conference = linphone_core_get_conference(marie->lc));
|
||||
if(conference) {
|
||||
MSList *participants = linphone_conference_get_participants(conference);
|
||||
BC_ASSERT_EQUAL(ms_list_size(participants), 2, int, "%d");
|
||||
ms_list_free_with_data(participants, (void(*)(void *))linphone_address_destroy);
|
||||
bctbx_list_t *participants = linphone_conference_get_participants(conference);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(participants), 2, int, "%d");
|
||||
bctbx_list_free_with_data(participants, (void(*)(void *))linphone_address_destroy);
|
||||
}
|
||||
|
||||
linphone_core_terminate_conference(marie->lc);
|
||||
|
|
@ -358,7 +358,7 @@ static void simple_conference_base(LinphoneCoreManager* marie, LinphoneCoreManag
|
|||
if(is_remote_conf) BC_ASSERT_TRUE(wait_for_list(lcs,&focus->stat.number_of_LinphoneCallReleased,3,10000));
|
||||
|
||||
end:
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void simple_conference(void) {
|
||||
|
|
@ -415,9 +415,9 @@ static void simple_call_transfer(void) {
|
|||
LinphoneCall *marie_calling_laure;
|
||||
|
||||
char* laure_identity=linphone_address_as_string(laure->identity);
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,laure->lc);
|
||||
|
||||
|
||||
BC_ASSERT_TRUE(call(marie,pauline));
|
||||
|
|
@ -467,7 +467,7 @@ end:
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
linphone_core_manager_destroy(laure);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void unattended_call_transfer(void) {
|
||||
|
|
@ -477,9 +477,9 @@ static void unattended_call_transfer(void) {
|
|||
LinphoneCall* pauline_called_by_marie;
|
||||
|
||||
char* laure_identity=linphone_address_as_string(laure->identity);
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,laure->lc);
|
||||
|
||||
|
||||
BC_ASSERT_TRUE(call(marie,pauline));
|
||||
|
|
@ -514,7 +514,7 @@ static void unattended_call_transfer(void) {
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
linphone_core_manager_destroy(laure);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void unattended_call_transfer_with_error(void) {
|
||||
|
|
@ -522,9 +522,9 @@ static void unattended_call_transfer_with_error(void) {
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
|
||||
LinphoneCall* pauline_called_by_marie;
|
||||
bool_t call_ok=TRUE;
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
|
||||
BC_ASSERT_TRUE((call_ok=call(marie,pauline)));
|
||||
if (call_ok){
|
||||
|
|
@ -555,7 +555,7 @@ static void unattended_call_transfer_with_error(void) {
|
|||
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -569,10 +569,10 @@ static void call_transfer_existing_call_outgoing_call(void) {
|
|||
LinphoneCall* laure_called_by_marie;
|
||||
LinphoneCall* lcall;
|
||||
bool_t call_ok=TRUE;
|
||||
const MSList* calls;
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
const bctbx_list_t* calls;
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,laure->lc);
|
||||
|
||||
/*marie call pauline*/
|
||||
BC_ASSERT_TRUE((call_ok=call(marie,pauline)));
|
||||
|
|
@ -639,7 +639,7 @@ end:
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(laure);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void eject_from_3_participants_conference(LinphoneCoreManager *marie, LinphoneCoreManager *pauline, LinphoneCoreManager *laure, LinphoneCoreManager *focus) {
|
||||
|
|
@ -651,10 +651,10 @@ static void eject_from_3_participants_conference(LinphoneCoreManager *marie, Lin
|
|||
LinphoneCall* pauline_called_by_marie;
|
||||
LinphoneCall* marie_call_laure;
|
||||
bool_t is_remote_conf;
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
if(focus) lcs=ms_list_append(lcs,focus->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,laure->lc);
|
||||
if(focus) lcs=bctbx_list_append(lcs,focus->lc);
|
||||
|
||||
is_remote_conf = (strcmp(lp_config_get_string(marie->lc->config, "misc", "conference_type", "local"), "remote") == 0);
|
||||
if(is_remote_conf) BC_ASSERT_PTR_NOT_NULL(focus);
|
||||
|
|
@ -716,7 +716,7 @@ static void eject_from_3_participants_conference(LinphoneCoreManager *marie, Lin
|
|||
BC_ASSERT_TRUE(wait_for_list(lcs,&laure->stat.number_of_LinphoneCallStreamsRunning,3,10000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneCallStreamsRunning,5,10000));
|
||||
BC_ASSERT_PTR_NOT_NULL(linphone_core_get_current_call(marie->lc));
|
||||
BC_ASSERT_EQUAL(ms_list_size(linphone_core_get_calls(marie->lc)), 2, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(linphone_core_get_calls(marie->lc)), 2, int, "%d");
|
||||
BC_ASSERT_PTR_NOT_NULL(linphone_core_get_current_call(pauline->lc));
|
||||
BC_ASSERT_PTR_NOT_NULL(linphone_core_get_current_call(laure->lc));
|
||||
} else {
|
||||
|
|
@ -736,7 +736,7 @@ static void eject_from_3_participants_conference(LinphoneCoreManager *marie, Lin
|
|||
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneCallEnd,initial_marie_stat.number_of_LinphoneCallEnd+3,3000));
|
||||
}
|
||||
end:
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void eject_from_3_participants_local_conference(void) {
|
||||
|
|
@ -765,10 +765,10 @@ static void eject_from_4_participants_conference(void) {
|
|||
LinphoneCall* marie_call_laure;
|
||||
LinphoneCall* marie_call_michelle;
|
||||
LinphoneCall* michelle_called_by_marie;
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
lcs=ms_list_append(lcs,michelle->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,laure->lc);
|
||||
lcs=bctbx_list_append(lcs,michelle->lc);
|
||||
|
||||
BC_ASSERT_TRUE(call(marie,pauline));
|
||||
marie_call_pauline=linphone_core_get_current_call(marie->lc);
|
||||
|
|
@ -811,7 +811,7 @@ static void eject_from_4_participants_conference(void) {
|
|||
BC_ASSERT_PTR_NULL(linphone_core_get_current_call(marie->lc));
|
||||
BC_ASSERT_TRUE(linphone_core_is_in_conference(marie->lc));
|
||||
BC_ASSERT_EQUAL(linphone_core_get_conference_size(marie->lc),3, int, "%d");
|
||||
BC_ASSERT_EQUAL(ms_list_size(linphone_core_get_calls(marie->lc)), 3, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(linphone_core_get_calls(marie->lc)), 3, int, "%d");
|
||||
BC_ASSERT_PTR_NOT_NULL(linphone_core_get_current_call(pauline->lc));
|
||||
BC_ASSERT_PTR_NOT_NULL(linphone_core_get_current_call(laure->lc));
|
||||
BC_ASSERT_PTR_NOT_NULL(linphone_core_get_current_call(michelle->lc));
|
||||
|
|
@ -837,7 +837,7 @@ end:
|
|||
linphone_core_manager_destroy(pauline);
|
||||
linphone_core_manager_destroy(laure);
|
||||
linphone_core_manager_destroy(michelle);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -852,7 +852,7 @@ void simple_remote_conference(void) {
|
|||
const char *laure_proxy_uri = linphone_proxy_config_get_server_addr(laure_proxy_config);
|
||||
const char *focus_uri = linphone_proxy_config_get_identity(focus_proxy_config);
|
||||
int laure_n_register = laure->stat.number_of_LinphoneRegistrationOk;
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
|
||||
lp_config_set_string(marie_config, "misc", "conference_type", "remote");
|
||||
lp_config_set_string(marie_config, "misc", "conference_focus_addr", focus_uri);
|
||||
|
|
@ -860,9 +860,9 @@ void simple_remote_conference(void) {
|
|||
linphone_proxy_config_edit(laure_proxy_config);
|
||||
linphone_proxy_config_set_route(laure_proxy_config, laure_proxy_uri);
|
||||
linphone_proxy_config_done(laure_proxy_config);
|
||||
lcs = ms_list_append(lcs, laure->lc);
|
||||
lcs = bctbx_list_append(lcs, laure->lc);
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &laure->stat.number_of_LinphoneRegistrationOk, laure_n_register+1, 5000));
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
|
||||
simple_conference_base(marie, pauline, laure, (LinphoneCoreManager *)focus);
|
||||
|
||||
|
|
@ -883,7 +883,7 @@ void simple_remote_conference_shut_down_focus(void) {
|
|||
const char *laure_proxy_uri = linphone_proxy_config_get_server_addr(laure_proxy_config);
|
||||
const char *focus_uri = linphone_proxy_config_get_identity(focus_proxy_config);
|
||||
int laure_n_register = laure->stat.number_of_LinphoneRegistrationOk;
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
|
||||
lp_config_set_string(marie_config, "misc", "conference_type", "remote");
|
||||
lp_config_set_string(marie_config, "misc", "conference_focus_addr", focus_uri);
|
||||
|
|
@ -891,9 +891,9 @@ void simple_remote_conference_shut_down_focus(void) {
|
|||
linphone_proxy_config_edit(laure_proxy_config);
|
||||
linphone_proxy_config_set_route(laure_proxy_config, laure_proxy_uri);
|
||||
linphone_proxy_config_done(laure_proxy_config);
|
||||
lcs = ms_list_append(lcs, laure->lc);
|
||||
lcs = bctbx_list_append(lcs, laure->lc);
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &laure->stat.number_of_LinphoneRegistrationOk, laure_n_register+1, 5000));
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
|
||||
simple_conference_base(marie, pauline, laure, (LinphoneCoreManager *)focus);
|
||||
|
||||
|
|
@ -914,7 +914,7 @@ void eject_from_3_participants_remote_conference(void) {
|
|||
const char *laure_proxy_uri = linphone_proxy_config_get_server_addr(laure_proxy_config);
|
||||
const char *focus_uri = linphone_proxy_config_get_identity(focus_proxy_config);
|
||||
int laure_n_register = laure->stat.number_of_LinphoneRegistrationOk;
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
|
||||
lp_config_set_string(marie_config, "misc", "conference_type", "remote");
|
||||
lp_config_set_string(marie_config, "misc", "conference_focus_addr", focus_uri);
|
||||
|
|
@ -922,9 +922,9 @@ void eject_from_3_participants_remote_conference(void) {
|
|||
linphone_proxy_config_edit(laure_proxy_config);
|
||||
linphone_proxy_config_set_route(laure_proxy_config, laure_proxy_uri);
|
||||
linphone_proxy_config_done(laure_proxy_config);
|
||||
lcs = ms_list_append(lcs, laure->lc);
|
||||
lcs = bctbx_list_append(lcs, laure->lc);
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &laure->stat.number_of_LinphoneRegistrationOk, laure_n_register+1, 5000));
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
|
||||
eject_from_3_participants_conference(marie, pauline, laure, (LinphoneCoreManager *)focus);
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ static void call_multicast_video(void) {
|
|||
#endif
|
||||
static void early_media_with_multicast_base(bool_t video) {
|
||||
LinphoneCoreManager *marie, *pauline, *pauline2;
|
||||
MSList* lcs = NULL;
|
||||
bctbx_list_t* lcs = NULL;
|
||||
int dummy=0;
|
||||
LinphoneVideoPolicy marie_policy, pauline_policy;
|
||||
LpConfig *marie_lp;
|
||||
|
|
@ -130,9 +130,9 @@ static void early_media_with_multicast_base(bool_t video) {
|
|||
linphone_core_enable_audio_multicast(marie->lc,TRUE);
|
||||
|
||||
|
||||
lcs = ms_list_append(lcs,marie->lc);
|
||||
lcs = ms_list_append(lcs,pauline->lc);
|
||||
lcs = ms_list_append(lcs,pauline2->lc);
|
||||
lcs = bctbx_list_append(lcs,marie->lc);
|
||||
lcs = bctbx_list_append(lcs,pauline->lc);
|
||||
lcs = bctbx_list_append(lcs,pauline2->lc);
|
||||
/*
|
||||
Marie calls Pauline, and after the call has rung, transitions to an early_media session
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -695,9 +695,9 @@ static void multiple_answers_call(void) {
|
|||
|
||||
LinphoneCall* call1, *call2;
|
||||
|
||||
MSList* lcs = ms_list_append(NULL,pauline->lc);
|
||||
lcs = ms_list_append(lcs,marie1->lc);
|
||||
lcs = ms_list_append(lcs,marie2->lc);
|
||||
bctbx_list_t* lcs = bctbx_list_append(NULL,pauline->lc);
|
||||
lcs = bctbx_list_append(lcs,marie1->lc);
|
||||
lcs = bctbx_list_append(lcs,marie2->lc);
|
||||
|
||||
|
||||
BC_ASSERT_TRUE(wait_for_until(pauline->lc, NULL, &pauline->stat.number_of_LinphoneRegistrationOk, 1, 2000));
|
||||
|
|
@ -740,9 +740,9 @@ static void multiple_answers_call_with_media_relay(void) {
|
|||
|
||||
LinphoneCall* call1, *call2;
|
||||
|
||||
MSList* lcs = ms_list_append(NULL,pauline->lc);
|
||||
lcs = ms_list_append(lcs,marie1->lc);
|
||||
lcs = ms_list_append(lcs,marie2->lc);
|
||||
bctbx_list_t* lcs = bctbx_list_append(NULL,pauline->lc);
|
||||
lcs = bctbx_list_append(lcs,marie1->lc);
|
||||
lcs = bctbx_list_append(lcs,marie2->lc);
|
||||
|
||||
linphone_core_set_user_agent(pauline->lc, "Natted Linphone", NULL);
|
||||
linphone_core_set_user_agent(marie1->lc, "Natted Linphone", NULL);
|
||||
|
|
@ -776,7 +776,7 @@ static void multiple_answers_call_with_media_relay(void) {
|
|||
linphone_core_manager_destroy(pauline);
|
||||
linphone_core_manager_destroy(marie1);
|
||||
linphone_core_manager_destroy(marie2);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void call_with_specified_codec_bitrate(void) {
|
||||
|
|
@ -837,7 +837,7 @@ end:
|
|||
}
|
||||
|
||||
|
||||
void disable_all_codecs(const MSList* elem, LinphoneCoreManager* call){
|
||||
void disable_all_codecs(const bctbx_list_t* elem, LinphoneCoreManager* call){
|
||||
|
||||
PayloadType *pt;
|
||||
|
||||
|
|
@ -856,7 +856,7 @@ static void call_with_no_audio_codec(void){
|
|||
LinphoneCoreManager* caller = linphone_core_manager_new(transport_supported(LinphoneTransportTcp) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCall* out_call ;
|
||||
|
||||
const MSList* elem =linphone_core_get_audio_codecs(caller->lc);
|
||||
const bctbx_list_t* elem =linphone_core_get_audio_codecs(caller->lc);
|
||||
|
||||
disable_all_codecs(elem, caller);
|
||||
|
||||
|
|
@ -961,7 +961,7 @@ static void cancelled_call(void) {
|
|||
}
|
||||
|
||||
void disable_all_audio_codecs_except_one(LinphoneCore *lc, const char *mime, int rate){
|
||||
const MSList *elem=linphone_core_get_audio_codecs(lc);
|
||||
const bctbx_list_t *elem=linphone_core_get_audio_codecs(lc);
|
||||
PayloadType *pt;
|
||||
|
||||
for(;elem!=NULL;elem=elem->next){
|
||||
|
|
@ -976,8 +976,8 @@ void disable_all_audio_codecs_except_one(LinphoneCore *lc, const char *mime, int
|
|||
|
||||
void disable_all_video_codecs_except_one(LinphoneCore *lc, const char *mime) {
|
||||
#ifdef VIDEO_ENABLED
|
||||
const MSList *codecs = linphone_core_get_video_codecs(lc);
|
||||
const MSList *it = NULL;
|
||||
const bctbx_list_t *codecs = linphone_core_get_video_codecs(lc);
|
||||
const bctbx_list_t *it = NULL;
|
||||
PayloadType *pt = NULL;
|
||||
|
||||
for(it = codecs; it != NULL; it = it->next) {
|
||||
|
|
@ -1072,7 +1072,7 @@ static void early_declined_call(void) {
|
|||
|
||||
BC_ASSERT_EQUAL(linphone_call_get_reason(out_call),LinphoneReasonBusy, int, "%d");
|
||||
*/
|
||||
if (ms_list_size(linphone_core_get_call_logs(pauline->lc))>0) {
|
||||
if (bctbx_list_size(linphone_core_get_call_logs(pauline->lc))>0) {
|
||||
BC_ASSERT_PTR_NOT_NULL(out_call_log=(LinphoneCallLog*)(linphone_core_get_call_logs(pauline->lc)->data));
|
||||
BC_ASSERT_EQUAL(linphone_call_log_get_status(out_call_log),LinphoneCallAborted, int, "%d");
|
||||
}
|
||||
|
|
@ -1548,11 +1548,11 @@ static void call_paused_by_both(void) {
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCall* call_pauline, *call_marie;
|
||||
const rtp_stats_t * stats;
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
bool_t call_ok;
|
||||
|
||||
lcs = ms_list_append(lcs, pauline->lc);
|
||||
lcs = ms_list_append(lcs, marie->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline->lc);
|
||||
lcs = bctbx_list_append(lcs, marie->lc);
|
||||
BC_ASSERT_TRUE((call_ok=call(pauline,marie)));
|
||||
|
||||
if (!call_ok) goto end;
|
||||
|
|
@ -1606,7 +1606,7 @@ static void call_paused_by_both(void) {
|
|||
end:
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
#define CHECK_CURRENT_LOSS_RATE() \
|
||||
|
|
@ -2316,10 +2316,10 @@ static void early_media_call_with_ice(void) {
|
|||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_early_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCall *marie_call;
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
|
||||
lcs = ms_list_append(lcs, marie->lc);
|
||||
lcs = ms_list_append(lcs, pauline->lc);
|
||||
lcs = bctbx_list_append(lcs, marie->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline->lc);
|
||||
|
||||
/*in this test, pauline has ICE activated, marie not, but marie proposes early media.
|
||||
* We want to check that ICE processing is not disturbing early media*/
|
||||
|
|
@ -2345,7 +2345,7 @@ static void early_media_call_with_ice(void) {
|
|||
|
||||
end_call(marie, pauline);
|
||||
end:
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -2353,15 +2353,15 @@ end:
|
|||
static void early_media_call_with_ringing(void){
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new("pauline_tcp_rc");
|
||||
MSList* lcs = NULL;
|
||||
bctbx_list_t* lcs = NULL;
|
||||
LinphoneCall* marie_call;
|
||||
LinphoneCallLog *marie_call_log;
|
||||
uint64_t connected_time=0;
|
||||
uint64_t ended_time=0;
|
||||
int dummy=0;
|
||||
|
||||
lcs = ms_list_append(lcs,marie->lc);
|
||||
lcs = ms_list_append(lcs,pauline->lc);
|
||||
lcs = bctbx_list_append(lcs,marie->lc);
|
||||
lcs = bctbx_list_append(lcs,pauline->lc);
|
||||
/*
|
||||
Marie calls Pauline, and after the call has rung, transitions to an early_media session
|
||||
*/
|
||||
|
|
@ -2398,7 +2398,7 @@ static void early_media_call_with_ringing(void){
|
|||
end_call(pauline, marie);
|
||||
ended_time=ms_get_cur_time_ms();
|
||||
BC_ASSERT_LOWER( labs((long)((linphone_call_log_get_duration(marie_call_log)*1000) - (int64_t)(ended_time - connected_time))), 1000, long, "%ld");
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
linphone_core_manager_destroy(marie);
|
||||
|
|
@ -2408,12 +2408,12 @@ static void early_media_call_with_ringing(void){
|
|||
static void early_media_call_with_update_base(bool_t media_change){
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
MSList* lcs = NULL;
|
||||
bctbx_list_t* lcs = NULL;
|
||||
LinphoneCall *marie_call, *pauline_call;
|
||||
LinphoneCallParams *pauline_params;
|
||||
|
||||
lcs = ms_list_append(lcs,marie->lc);
|
||||
lcs = ms_list_append(lcs,pauline->lc);
|
||||
lcs = bctbx_list_append(lcs,marie->lc);
|
||||
lcs = bctbx_list_append(lcs,pauline->lc);
|
||||
if (media_change) {
|
||||
disable_all_audio_codecs_except_one(marie->lc,"pcmu",-1);
|
||||
disable_all_audio_codecs_except_one(pauline->lc,"pcmu",-1);
|
||||
|
|
@ -2470,7 +2470,7 @@ static void early_media_call_with_update_base(bool_t media_change){
|
|||
|
||||
end:
|
||||
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -2714,13 +2714,13 @@ static void call_redirect(void){
|
|||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCoreManager* laure = linphone_core_manager_new("laure_rc_udp");
|
||||
MSList* lcs = NULL;
|
||||
bctbx_list_t* lcs = NULL;
|
||||
char *laure_url = NULL;
|
||||
LinphoneCall* marie_call;
|
||||
|
||||
lcs = ms_list_append(lcs,marie->lc);
|
||||
lcs = ms_list_append(lcs,pauline->lc);
|
||||
lcs = ms_list_append(lcs,laure->lc);
|
||||
lcs = bctbx_list_append(lcs,marie->lc);
|
||||
lcs = bctbx_list_append(lcs,pauline->lc);
|
||||
lcs = bctbx_list_append(lcs,laure->lc);
|
||||
/*
|
||||
Marie calls Pauline, which will redirect the call to Laure via a 302
|
||||
*/
|
||||
|
|
@ -2753,7 +2753,7 @@ static void call_redirect(void){
|
|||
end_call(laure, marie);
|
||||
}
|
||||
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
|
|
@ -2864,7 +2864,7 @@ static void call_rejected_without_403_because_wrong_credentials_no_auth_req_cb(v
|
|||
call_rejected_because_wrong_credentials_with_params("tester-no-403",FALSE);
|
||||
}
|
||||
|
||||
void check_media_direction(LinphoneCoreManager* mgr, LinphoneCall *call, MSList* lcs,LinphoneMediaDirection audio_dir, LinphoneMediaDirection video_dir) {
|
||||
void check_media_direction(LinphoneCoreManager* mgr, LinphoneCall *call, bctbx_list_t* lcs,LinphoneMediaDirection audio_dir, LinphoneMediaDirection video_dir) {
|
||||
BC_ASSERT_PTR_NOT_NULL(call);
|
||||
if (call) {
|
||||
const LinphoneCallParams *params;
|
||||
|
|
@ -3272,7 +3272,7 @@ end:
|
|||
void early_media_without_sdp_in_200_base( bool_t use_video, bool_t use_ice ){
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
MSList* lcs = NULL;
|
||||
bctbx_list_t* lcs = NULL;
|
||||
LinphoneCall* marie_call;
|
||||
LinphoneCallParams* params = NULL;
|
||||
LinphoneCallLog *marie_call_log;
|
||||
|
|
@ -3280,8 +3280,8 @@ void early_media_without_sdp_in_200_base( bool_t use_video, bool_t use_ice ){
|
|||
uint64_t ended_time=0;
|
||||
int dummy=0;
|
||||
|
||||
lcs = ms_list_append(lcs,marie->lc);
|
||||
lcs = ms_list_append(lcs,pauline->lc);
|
||||
lcs = bctbx_list_append(lcs,marie->lc);
|
||||
lcs = bctbx_list_append(lcs,pauline->lc);
|
||||
if (use_ice){
|
||||
linphone_core_set_firewall_policy(marie->lc, LinphonePolicyUseIce);
|
||||
}
|
||||
|
|
@ -3336,7 +3336,7 @@ void early_media_without_sdp_in_200_base( bool_t use_video, bool_t use_ice ){
|
|||
ended_time=ms_get_cur_time_ms();
|
||||
BC_ASSERT_LOWER(labs((long)((linphone_call_log_get_duration(marie_call_log)*1000) - (int64_t)(ended_time - connected_time))), 1000, long, "%ld");
|
||||
}
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -4161,11 +4161,11 @@ static void _call_with_network_switch(bool_t use_ice, bool_t with_socket_refresh
|
|||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCallParams *pauline_params = NULL;
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
bool_t call_ok;
|
||||
|
||||
lcs = ms_list_append(lcs, marie->lc);
|
||||
lcs = ms_list_append(lcs, pauline->lc);
|
||||
lcs = bctbx_list_append(lcs, marie->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline->lc);
|
||||
|
||||
if (use_ice){
|
||||
linphone_core_set_firewall_policy(marie->lc,LinphonePolicyUseIce);
|
||||
|
|
@ -4227,7 +4227,7 @@ end:
|
|||
if (pauline_params) {
|
||||
linphone_call_params_unref(pauline_params);
|
||||
}
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -4251,13 +4251,13 @@ static void call_with_network_switch_and_socket_refresh(void){
|
|||
static void call_with_sip_and_rtp_independant_switches(void){
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
bool_t call_ok;
|
||||
bool_t use_ice = TRUE;
|
||||
bool_t with_socket_refresh = TRUE;
|
||||
|
||||
lcs = ms_list_append(lcs, marie->lc);
|
||||
lcs = ms_list_append(lcs, pauline->lc);
|
||||
lcs = bctbx_list_append(lcs, marie->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline->lc);
|
||||
|
||||
if (use_ice){
|
||||
linphone_core_set_firewall_policy(marie->lc,LinphonePolicyUseIce);
|
||||
|
|
@ -4320,7 +4320,7 @@ static void call_with_sip_and_rtp_independant_switches(void){
|
|||
/*pauline shall be able to end the call without problem now*/
|
||||
end_call(pauline, marie);
|
||||
end:
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -4331,13 +4331,13 @@ end:
|
|||
static void call_logs_if_no_db_set(void) {
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* laure = linphone_core_manager_new("laure_call_logs_rc");
|
||||
BC_ASSERT_TRUE(ms_list_size(laure->lc->call_logs) == 10);
|
||||
BC_ASSERT_TRUE(bctbx_list_size(laure->lc->call_logs) == 10);
|
||||
|
||||
BC_ASSERT_TRUE(call(marie, laure));
|
||||
wait_for_until(marie->lc, laure->lc, NULL, 5, 1000);
|
||||
end_call(marie, laure);
|
||||
|
||||
BC_ASSERT_TRUE(ms_list_size(laure->lc->call_logs) == 11);
|
||||
BC_ASSERT_TRUE(bctbx_list_size(laure->lc->call_logs) == 11);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(laure);
|
||||
}
|
||||
|
|
@ -4349,13 +4349,13 @@ static void call_logs_migrate(void) {
|
|||
int incoming_count = 0, outgoing_count = 0, missed_count = 0, aborted_count = 0, decline_count = 0, video_enabled_count = 0;
|
||||
|
||||
unlink(logs_db);
|
||||
BC_ASSERT_TRUE(ms_list_size(laure->lc->call_logs) == 10);
|
||||
BC_ASSERT_TRUE(bctbx_list_size(laure->lc->call_logs) == 10);
|
||||
|
||||
linphone_core_set_call_logs_database_path(laure->lc, logs_db);
|
||||
BC_ASSERT_TRUE(linphone_core_get_call_history_size(laure->lc) == 10);
|
||||
|
||||
for (; i < ms_list_size(laure->lc->call_logs); i++) {
|
||||
LinphoneCallLog *log = ms_list_nth_data(laure->lc->call_logs, i);
|
||||
for (; i < bctbx_list_size(laure->lc->call_logs); i++) {
|
||||
LinphoneCallLog *log = bctbx_list_nth_data(laure->lc->call_logs, i);
|
||||
LinphoneCallStatus state = linphone_call_log_get_status(log);
|
||||
LinphoneCallDir direction = linphone_call_log_get_dir(log);
|
||||
|
||||
|
|
@ -4394,9 +4394,9 @@ static void call_logs_migrate(void) {
|
|||
}
|
||||
}
|
||||
|
||||
laure->lc->call_logs = ms_list_free_with_data(laure->lc->call_logs, (void (*)(void*))linphone_call_log_unref);
|
||||
laure->lc->call_logs = bctbx_list_free_with_data(laure->lc->call_logs, (void (*)(void*))linphone_call_log_unref);
|
||||
call_logs_read_from_config_file(laure->lc);
|
||||
BC_ASSERT_TRUE(ms_list_size(laure->lc->call_logs) == 0);
|
||||
BC_ASSERT_TRUE(bctbx_list_size(laure->lc->call_logs) == 0);
|
||||
|
||||
unlink(logs_db);
|
||||
ms_free(logs_db);
|
||||
|
|
@ -4407,7 +4407,7 @@ static void call_logs_sqlite_storage(void) {
|
|||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
char *logs_db = bc_tester_file("call_logs.db");
|
||||
MSList *logs = NULL;
|
||||
bctbx_list_t *logs = NULL;
|
||||
LinphoneCallLog *call_log = NULL;
|
||||
LinphoneAddress *laure = NULL;
|
||||
time_t user_data_time = time(NULL);
|
||||
|
|
@ -4427,16 +4427,16 @@ static void call_logs_sqlite_storage(void) {
|
|||
BC_ASSERT_TRUE(linphone_core_get_call_history_size(marie->lc) == 1);
|
||||
|
||||
logs = linphone_core_get_call_history_for_address(marie->lc, linphone_proxy_config_get_identity_address(linphone_core_get_default_proxy_config(pauline->lc)));
|
||||
BC_ASSERT_TRUE(ms_list_size(logs) == 1);
|
||||
ms_list_free_with_data(logs, (void (*)(void*))linphone_call_log_unref);
|
||||
BC_ASSERT_TRUE(bctbx_list_size(logs) == 1);
|
||||
bctbx_list_free_with_data(logs, (void (*)(void*))linphone_call_log_unref);
|
||||
|
||||
laure = linphone_address_new("\"Laure\" <sip:laure@sip.example.org>");
|
||||
logs = linphone_core_get_call_history_for_address(marie->lc, laure);
|
||||
BC_ASSERT_TRUE(ms_list_size(logs) == 0);
|
||||
BC_ASSERT_TRUE(bctbx_list_size(logs) == 0);
|
||||
linphone_address_destroy(laure);
|
||||
|
||||
logs = linphone_core_get_call_history_for_address(marie->lc, linphone_proxy_config_get_identity_address(linphone_core_get_default_proxy_config(pauline->lc)));
|
||||
if (BC_ASSERT_TRUE(ms_list_size(logs) == 1)) {
|
||||
if (BC_ASSERT_TRUE(bctbx_list_size(logs) == 1)) {
|
||||
const char *call_id;
|
||||
const char *ref_key = linphone_call_log_get_ref_key(call_log);
|
||||
call_log = logs->data;
|
||||
|
|
@ -4473,8 +4473,8 @@ static void call_logs_sqlite_storage(void) {
|
|||
BC_ASSERT_EQUAL(linphone_call_log_get_status(call_log), LinphoneCallSuccess, int, "%d");
|
||||
}
|
||||
|
||||
linphone_core_delete_call_log(marie->lc, (LinphoneCallLog *)ms_list_nth_data(logs, 0));
|
||||
ms_list_free_with_data(logs, (void (*)(void*))linphone_call_log_unref);
|
||||
linphone_core_delete_call_log(marie->lc, (LinphoneCallLog *)bctbx_list_nth_data(logs, 0));
|
||||
bctbx_list_free_with_data(logs, (void (*)(void*))linphone_call_log_unref);
|
||||
BC_ASSERT_TRUE(linphone_core_get_call_history_size(marie->lc) == 0);
|
||||
|
||||
reset_counters(&marie->stat);
|
||||
|
|
@ -4554,10 +4554,10 @@ static void _call_with_rtcp_mux(bool_t caller_rtcp_mux, bool_t callee_rtcp_mux,
|
|||
LinphoneCoreManager * marie = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager *pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
const LinphoneCallParams *params;
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
|
||||
lcs = ms_list_append(lcs, marie->lc);
|
||||
lcs = ms_list_append(lcs, pauline->lc);
|
||||
lcs = bctbx_list_append(lcs, marie->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline->lc);
|
||||
|
||||
if (caller_rtcp_mux){
|
||||
lp_config_set_int(linphone_core_get_config(marie->lc), "rtp", "rtcp_mux", 1);
|
||||
|
|
@ -4604,7 +4604,7 @@ static void _call_with_rtcp_mux(bool_t caller_rtcp_mux, bool_t callee_rtcp_mux,
|
|||
end_call(marie,pauline);
|
||||
|
||||
end:
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
linphone_core_manager_destroy(marie);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@ static void call_paused_resumed_with_video_base(bool_t sdp_200_ack
|
|||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCall* call_pauline, *call_marie;
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
LinphoneVideoPolicy vpol;
|
||||
bool_t call_ok;
|
||||
LinphoneCoreVTable *vtable = linphone_core_v_table_new();
|
||||
vtable->call_state_changed = call_paused_resumed_with_video_base_call_cb;
|
||||
lcs = ms_list_append(lcs, pauline->lc);
|
||||
lcs = ms_list_append(lcs, marie->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline->lc);
|
||||
lcs = bctbx_list_append(lcs, marie->lc);
|
||||
|
||||
vpol.automatically_accept = FALSE;
|
||||
vpol.automatically_initiate = TRUE; /* needed to present a video mline*/
|
||||
|
|
@ -127,7 +127,7 @@ static void call_paused_resumed_with_video_base(bool_t sdp_200_ack
|
|||
end:
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
static void call_paused_resumed_with_video(void){
|
||||
call_paused_resumed_with_video_base(FALSE, FALSE,FALSE,FALSE);
|
||||
|
|
@ -1079,7 +1079,7 @@ static void zrtp_video_ice_call(void) {
|
|||
call_base(LinphoneMediaEncryptionZRTP,TRUE,FALSE,LinphonePolicyUseIce,FALSE);
|
||||
}
|
||||
|
||||
static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, LinphoneCoreManager *marie, MSList *lcs) {
|
||||
static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, LinphoneCoreManager *marie, bctbx_list_t *lcs) {
|
||||
#define DEFAULT_WAIT_FOR 10000
|
||||
LinphoneCallParams *params;
|
||||
LinphoneVideoPolicy pol;
|
||||
|
|
@ -1139,7 +1139,7 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone
|
|||
}
|
||||
static void accept_call_in_send_base(bool_t caller_has_ice) {
|
||||
LinphoneCoreManager *pauline, *marie;
|
||||
MSList *lcs=NULL;;
|
||||
bctbx_list_t *lcs=NULL;;
|
||||
|
||||
marie = linphone_core_manager_new("marie_rc");
|
||||
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
|
|
@ -1147,14 +1147,14 @@ static void accept_call_in_send_base(bool_t caller_has_ice) {
|
|||
linphone_core_set_firewall_policy(pauline->lc,LinphonePolicyUseIce);
|
||||
}
|
||||
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,marie->lc);
|
||||
|
||||
accept_call_in_send_only_base(pauline,marie,lcs);
|
||||
|
||||
|
||||
end_call(marie,pauline);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -1169,16 +1169,16 @@ static void accept_call_in_send_only_with_ice(void) {
|
|||
|
||||
void two_accepted_call_in_send_only(void) {
|
||||
LinphoneCoreManager *pauline, *marie, *laure;
|
||||
MSList *lcs=NULL;
|
||||
bctbx_list_t *lcs=NULL;
|
||||
|
||||
marie = linphone_core_manager_new("marie_rc");
|
||||
linphone_core_use_files(marie->lc, TRUE);
|
||||
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
laure = linphone_core_manager_new("laure_rc_udp");
|
||||
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,laure->lc);
|
||||
|
||||
accept_call_in_send_only_base(pauline,marie,lcs);
|
||||
|
||||
|
|
@ -1191,7 +1191,7 @@ void two_accepted_call_in_send_only(void) {
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
linphone_core_manager_destroy(laure);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void video_early_media_call(void) {
|
||||
|
|
@ -1219,7 +1219,7 @@ static void multiple_early_media(void) {
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new("pauline_tcp_rc");
|
||||
LinphoneCoreManager* marie1 = linphone_core_manager_new("marie_early_rc");
|
||||
LinphoneCoreManager* marie2 = linphone_core_manager_new("marie_early_rc");
|
||||
MSList *lcs=NULL;
|
||||
bctbx_list_t *lcs=NULL;
|
||||
LinphoneCallParams *params=linphone_core_create_call_params(pauline->lc, NULL);
|
||||
LinphoneVideoPolicy pol;
|
||||
LinphoneCall *marie1_call;
|
||||
|
|
@ -1243,9 +1243,9 @@ static void multiple_early_media(void) {
|
|||
linphone_core_set_audio_port_range(marie2->lc,40200,40300);
|
||||
linphone_core_set_video_port_range(marie2->lc,40400,40500);
|
||||
|
||||
lcs=ms_list_append(lcs,marie1->lc);
|
||||
lcs=ms_list_append(lcs,marie2->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,marie1->lc);
|
||||
lcs=bctbx_list_append(lcs,marie2->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
|
||||
linphone_call_params_enable_early_media_sending(params,TRUE);
|
||||
linphone_call_params_enable_video(params,TRUE);
|
||||
|
|
@ -1293,7 +1293,7 @@ static void multiple_early_media(void) {
|
|||
|
||||
end_call(pauline, marie1);
|
||||
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
linphone_core_manager_destroy(marie1);
|
||||
linphone_core_manager_destroy(marie2);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
|
|
@ -1359,12 +1359,12 @@ static void classic_video_entry_phone_setup(void) {
|
|||
LinphoneCallParams *in_call_params = NULL;
|
||||
LinphoneCall *callee_call = NULL;
|
||||
LinphoneVideoPolicy vpol = { TRUE, TRUE };
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
int retry = 0;
|
||||
bool_t ok;
|
||||
|
||||
lcs = ms_list_append(lcs, caller_mgr->lc);
|
||||
lcs = ms_list_append(lcs, callee_mgr->lc);
|
||||
lcs = bctbx_list_append(lcs, caller_mgr->lc);
|
||||
lcs = bctbx_list_append(lcs, callee_mgr->lc);
|
||||
|
||||
linphone_core_enable_video_capture(caller_mgr->lc, TRUE);
|
||||
linphone_core_enable_video_display(caller_mgr->lc, TRUE);
|
||||
|
|
@ -1443,7 +1443,7 @@ static void classic_video_entry_phone_setup(void) {
|
|||
end:
|
||||
linphone_core_manager_destroy(callee_mgr);
|
||||
linphone_core_manager_destroy(caller_mgr);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
static void video_call_recording_h264_test(void) {
|
||||
record_call("recording", TRUE, "H264");
|
||||
|
|
@ -1495,7 +1495,7 @@ static void video_call_with_re_invite_inactive_followed_by_re_invite_base(Linpho
|
|||
LinphoneCoreManager* pauline;
|
||||
LinphoneCallParams *params;
|
||||
const LinphoneCallParams *current_params;
|
||||
MSList *lcs=NULL;
|
||||
bctbx_list_t *lcs=NULL;
|
||||
bool_t calls_ok;
|
||||
|
||||
marie = linphone_core_manager_new( "marie_rc");
|
||||
|
|
@ -1512,8 +1512,8 @@ static void video_call_with_re_invite_inactive_followed_by_re_invite_base(Linpho
|
|||
linphone_core_set_video_device(pauline->lc,liblinphone_tester_mire_id);
|
||||
linphone_core_set_video_device(marie->lc,liblinphone_tester_mire_id);
|
||||
linphone_core_set_avpf_mode(marie->lc,TRUE);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,marie->lc);
|
||||
|
||||
video_call_base_2(marie,pauline,TRUE,mode,TRUE,TRUE);
|
||||
|
||||
|
|
@ -1662,9 +1662,9 @@ static void video_call_with_no_audio_and_no_video_codec(void){
|
|||
LinphoneVideoPolicy callee_policy, caller_policy;
|
||||
LinphoneCallTestParams caller_test_params = {0}, callee_test_params = {0};
|
||||
|
||||
const MSList* elem_video =linphone_core_get_video_codecs(caller->lc);
|
||||
const bctbx_list_t* elem_video =linphone_core_get_video_codecs(caller->lc);
|
||||
|
||||
const MSList* elem_audio =linphone_core_get_audio_codecs(caller->lc);
|
||||
const bctbx_list_t* elem_audio =linphone_core_get_audio_codecs(caller->lc);
|
||||
|
||||
disable_all_codecs(elem_audio, caller);
|
||||
disable_all_codecs(elem_video, caller);
|
||||
|
|
|
|||
|
|
@ -129,8 +129,8 @@ static void subscribe_test_declined(void) {
|
|||
LinphoneContent* content;
|
||||
LinphoneEvent *lev;
|
||||
const LinphoneErrorInfo *ei;
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
|
||||
content = linphone_core_create_content(marie->lc);
|
||||
linphone_content_set_type(content,"application");
|
||||
|
|
@ -171,9 +171,9 @@ static void subscribe_test_with_args(bool_t terminated_by_subscriber, RefreshTes
|
|||
LinphoneContent* content;
|
||||
LinphoneEvent *lev;
|
||||
int expires= refresh_type!=NoRefresh ? 4 : 600;
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
|
||||
if (refresh_type==ManualRefresh){
|
||||
lp_config_set_int(marie->lc->config,"sip","refresh_generic_subscribe",0);
|
||||
|
|
@ -224,9 +224,9 @@ static void subscribe_test_with_args2(bool_t terminated_by_subscriber, RefreshTe
|
|||
LinphoneContent* content;
|
||||
LinphoneEvent *lev;
|
||||
int expires= refresh_type!=NoRefresh ? 4 : 600;
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
|
||||
if (refresh_type==ManualRefresh){
|
||||
lp_config_set_int(marie->lc->config,"sip","refresh_generic_subscribe",0);
|
||||
|
|
@ -308,8 +308,8 @@ static void publish_test_with_args(bool_t refresh, int expires){
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
|
||||
LinphoneContent* content;
|
||||
LinphoneEvent *lev;
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
|
||||
content = linphone_core_create_content(marie->lc);
|
||||
linphone_content_set_type(content,"application");
|
||||
|
|
@ -363,8 +363,8 @@ static void out_of_dialog_notify(void){
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
|
||||
LinphoneContent* content;
|
||||
LinphoneEvent *lev;
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
|
||||
content = linphone_core_create_content(marie->lc);
|
||||
linphone_content_set_type(content,"application");
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ static void subscribe_forking(void) {
|
|||
LinphoneContent* content;
|
||||
LinphoneEvent *lev;
|
||||
int expires= 600;
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,pauline2->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline2->lc);
|
||||
|
||||
content = linphone_core_create_content(marie->lc);
|
||||
linphone_content_set_type(content,"application");
|
||||
|
|
@ -55,20 +55,20 @@ static void subscribe_forking(void) {
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
linphone_core_manager_destroy(pauline2);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void message_forking(void) {
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
LinphoneChatRoom* chat_room = linphone_core_get_chat_room(pauline->lc, marie->identity);
|
||||
LinphoneChatMessage* message = linphone_chat_room_create_message(chat_room,"Bli bli bli \n blu");
|
||||
LinphoneChatMessageCbs *cbs = linphone_chat_message_get_callbacks(message);
|
||||
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,marie2->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,marie2->lc);
|
||||
|
||||
linphone_chat_message_cbs_set_msg_state_changed(cbs, liblinphone_tester_chat_message_msg_state_changed);
|
||||
linphone_chat_room_send_chat_message(chat_room, message);
|
||||
|
|
@ -84,7 +84,7 @@ static void message_forking(void) {
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(marie2);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void message_forking_with_unreachable_recipients(void) {
|
||||
|
|
@ -92,14 +92,14 @@ static void message_forking_with_unreachable_recipients(void) {
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new( transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
LinphoneChatRoom* chat_room = linphone_core_get_chat_room(pauline->lc, marie->identity);
|
||||
LinphoneChatMessage* message = linphone_chat_room_create_message(chat_room,"Bli bli bli \n blu");
|
||||
LinphoneChatMessageCbs *cbs = linphone_chat_message_get_callbacks(message);
|
||||
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,marie2->lc);
|
||||
lcs=ms_list_append(lcs,marie3->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,marie2->lc);
|
||||
lcs=bctbx_list_append(lcs,marie3->lc);
|
||||
|
||||
/*the following lines are to workaround a problem with messages sent by a previous test (Message forking) that arrive together with REGISTER responses,
|
||||
* because the ForkMessageContext is not terminated at flexisip side if Message forking test is passing fast*/
|
||||
|
|
@ -134,7 +134,7 @@ static void message_forking_with_unreachable_recipients(void) {
|
|||
linphone_core_manager_destroy(marie2);
|
||||
linphone_core_manager_destroy(marie3);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void message_forking_with_all_recipients_unreachable(void) {
|
||||
|
|
@ -142,14 +142,14 @@ static void message_forking_with_all_recipients_unreachable(void) {
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new( transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
LinphoneChatRoom* chat_room = linphone_core_get_chat_room(pauline->lc, marie->identity);
|
||||
LinphoneChatMessage* message = linphone_chat_room_create_message(chat_room,"Bli bli bli \n blu");
|
||||
LinphoneChatMessageCbs *cbs = linphone_chat_message_get_callbacks(message);
|
||||
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,marie2->lc);
|
||||
lcs=ms_list_append(lcs,marie3->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,marie2->lc);
|
||||
lcs=bctbx_list_append(lcs,marie3->lc);
|
||||
|
||||
/*the following lines are to workaround a problem with messages sent by a previous test (Message forking) that arrive together with REGISTER responses,
|
||||
* because the ForkMessageContext is not terminated at flexisip side if Message forking test is passing fast*/
|
||||
|
|
@ -193,7 +193,7 @@ static void message_forking_with_all_recipients_unreachable(void) {
|
|||
linphone_core_manager_destroy(marie2);
|
||||
linphone_core_manager_destroy(marie3);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void call_forking(void){
|
||||
|
|
@ -201,11 +201,11 @@ static void call_forking(void){
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new( transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
|
||||
MSList* lcs=ms_list_append(NULL,pauline->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,pauline->lc);
|
||||
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
lcs=ms_list_append(lcs,marie2->lc);
|
||||
lcs=ms_list_append(lcs,marie3->lc);
|
||||
lcs=bctbx_list_append(lcs,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,marie2->lc);
|
||||
lcs=bctbx_list_append(lcs,marie3->lc);
|
||||
|
||||
linphone_core_set_user_agent(marie->lc,"Natted Linphone",NULL);
|
||||
linphone_core_set_user_agent(marie2->lc,"Natted Linphone",NULL);
|
||||
|
|
@ -239,7 +239,7 @@ static void call_forking(void){
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(marie2);
|
||||
linphone_core_manager_destroy(marie3);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void call_forking_with_urgent_reply(void){
|
||||
|
|
@ -247,10 +247,10 @@ static void call_forking_with_urgent_reply(void){
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new( transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
|
||||
MSList* lcs=ms_list_append(NULL,pauline->lc);
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
lcs=ms_list_append(lcs,marie2->lc);
|
||||
lcs=ms_list_append(lcs,marie3->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,marie2->lc);
|
||||
lcs=bctbx_list_append(lcs,marie3->lc);
|
||||
|
||||
if (linphone_core_media_encryption_supported(pauline->lc,LinphoneMediaEncryptionSRTP)) {
|
||||
linphone_core_set_user_agent(marie->lc,"Natted Linphone",NULL);
|
||||
|
|
@ -284,7 +284,7 @@ static void call_forking_with_urgent_reply(void){
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(marie2);
|
||||
linphone_core_manager_destroy(marie3);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void call_forking_cancelled(void){
|
||||
|
|
@ -292,11 +292,11 @@ static void call_forking_cancelled(void){
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new( transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
|
||||
MSList* lcs=ms_list_append(NULL,pauline->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,pauline->lc);
|
||||
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
lcs=ms_list_append(lcs,marie2->lc);
|
||||
lcs=ms_list_append(lcs,marie3->lc);
|
||||
lcs=bctbx_list_append(lcs,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,marie2->lc);
|
||||
lcs=bctbx_list_append(lcs,marie3->lc);
|
||||
|
||||
linphone_core_set_user_agent(marie->lc,"Natted Linphone",NULL);
|
||||
linphone_core_set_user_agent(marie2->lc,"Natted Linphone",NULL);
|
||||
|
|
@ -324,7 +324,7 @@ static void call_forking_cancelled(void){
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(marie2);
|
||||
linphone_core_manager_destroy(marie3);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void call_forking_declined(bool_t declined_globaly){
|
||||
|
|
@ -332,11 +332,11 @@ static void call_forking_declined(bool_t declined_globaly){
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new( transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
|
||||
MSList* lcs=ms_list_append(NULL,pauline->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,pauline->lc);
|
||||
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
lcs=ms_list_append(lcs,marie2->lc);
|
||||
lcs=ms_list_append(lcs,marie3->lc);
|
||||
lcs=bctbx_list_append(lcs,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,marie2->lc);
|
||||
lcs=bctbx_list_append(lcs,marie3->lc);
|
||||
|
||||
linphone_core_set_user_agent(marie->lc,"Natted Linphone",NULL);
|
||||
linphone_core_set_user_agent(marie2->lc,"Natted Linphone",NULL);
|
||||
|
|
@ -379,7 +379,7 @@ static void call_forking_declined(bool_t declined_globaly){
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(marie2);
|
||||
linphone_core_manager_destroy(marie3);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void call_forking_declined_globaly(void){
|
||||
|
|
@ -391,7 +391,7 @@ static void call_forking_declined_localy(void){
|
|||
}
|
||||
|
||||
static void call_forking_with_push_notification_single(void){
|
||||
MSList* lcs;
|
||||
bctbx_list_t* lcs;
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new2( "marie_rc", FALSE);
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new2( transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc",FALSE);
|
||||
int dummy=0;
|
||||
|
|
@ -402,8 +402,8 @@ static void call_forking_with_push_notification_single(void){
|
|||
linphone_core_get_default_proxy_config(marie->lc),
|
||||
"app-id=org.linphonetester;pn-tok=aaabbb;pn-type=apple;pn-msg-str=33;pn-call-str=34;");
|
||||
|
||||
lcs=ms_list_append(NULL,pauline->lc);
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
lcs=bctbx_list_append(NULL,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,marie->lc);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneRegistrationOk,1,5000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneRegistrationOk,1,5000));
|
||||
|
|
@ -437,7 +437,7 @@ static void call_forking_with_push_notification_single(void){
|
|||
|
||||
linphone_core_manager_destroy(pauline);
|
||||
linphone_core_manager_destroy(marie);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void call_forking_with_push_notification_multiple(void){
|
||||
|
|
@ -445,10 +445,10 @@ static void call_forking_with_push_notification_multiple(void){
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new( transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
|
||||
|
||||
MSList* lcs=ms_list_append(NULL,pauline->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,pauline->lc);
|
||||
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
lcs=ms_list_append(lcs,marie2->lc);
|
||||
lcs=bctbx_list_append(lcs,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,marie2->lc);
|
||||
|
||||
linphone_core_set_user_agent(marie->lc,"Natted Linphone",NULL);
|
||||
linphone_core_set_user_agent(marie2->lc,"Natted Linphone",NULL);
|
||||
|
|
@ -497,11 +497,11 @@ static void call_forking_not_responded(void){
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new( transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* marie3 = linphone_core_manager_new( "marie_rc");
|
||||
MSList* lcs=ms_list_append(NULL,pauline->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,pauline->lc);
|
||||
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
lcs=ms_list_append(lcs,marie2->lc);
|
||||
lcs=ms_list_append(lcs,marie3->lc);
|
||||
lcs=bctbx_list_append(lcs,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,marie2->lc);
|
||||
lcs=bctbx_list_append(lcs,marie3->lc);
|
||||
|
||||
linphone_core_set_user_agent(marie->lc,"Natted Linphone",NULL);
|
||||
linphone_core_set_user_agent(marie2->lc,"Natted Linphone",NULL);
|
||||
|
|
@ -527,14 +527,14 @@ static void call_forking_not_responded(void){
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(marie2);
|
||||
linphone_core_manager_destroy(marie3);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void early_media_call_forking(void) {
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_early_rc");
|
||||
LinphoneCoreManager* marie2 = linphone_core_manager_new("marie_early_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
MSList *lcs=NULL;
|
||||
bctbx_list_t *lcs=NULL;
|
||||
LinphoneCallParams *params=linphone_core_create_call_params(pauline->lc, NULL);
|
||||
LinphoneVideoPolicy pol;
|
||||
int dummy=0;
|
||||
|
|
@ -560,9 +560,9 @@ static void early_media_call_forking(void) {
|
|||
linphone_core_set_audio_port_range(marie2->lc,40200,40300);
|
||||
linphone_core_set_video_port_range(marie2->lc,40400,40500);
|
||||
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
lcs=ms_list_append(lcs,marie2->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,marie2->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
|
||||
linphone_call_params_enable_early_media_sending(params,TRUE);
|
||||
linphone_call_params_enable_video(params,TRUE);
|
||||
|
|
@ -600,7 +600,7 @@ static void early_media_call_forking(void) {
|
|||
|
||||
end_call(pauline, marie);
|
||||
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
linphone_core_manager_destroy(marie2);
|
||||
linphone_core_manager_destroy(marie);
|
||||
|
|
@ -611,10 +611,10 @@ static void call_with_sips(void){
|
|||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_sips_rc");
|
||||
LinphoneCoreManager* pauline1 = linphone_core_manager_new( "pauline_sips_rc");
|
||||
LinphoneCoreManager* pauline2 = linphone_core_manager_new( "pauline_tcp_rc");
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
|
||||
lcs=ms_list_append(lcs,pauline1->lc);
|
||||
lcs=ms_list_append(lcs,pauline2->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline1->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline2->lc);
|
||||
|
||||
linphone_core_set_user_agent(marie->lc,"Natted Linphone",NULL);
|
||||
linphone_core_set_user_agent(pauline1->lc,"Natted Linphone",NULL);
|
||||
|
|
@ -644,7 +644,7 @@ static void call_with_sips(void){
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline1);
|
||||
linphone_core_manager_destroy(pauline2);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -653,13 +653,13 @@ static void call_with_sips_not_achievable(void){
|
|||
LinphoneCoreManager* pauline2 = linphone_core_manager_new( "pauline_tcp_rc");
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_sips_rc");
|
||||
LinphoneCoreManager* pauline1 = linphone_core_manager_new( "pauline_rc");
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
LinphoneAddress *dest;
|
||||
LinphoneCall *call;
|
||||
const LinphoneErrorInfo *ei;
|
||||
|
||||
lcs=ms_list_append(lcs,pauline1->lc);
|
||||
lcs=ms_list_append(lcs,pauline2->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline1->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline2->lc);
|
||||
|
||||
|
||||
dest=linphone_address_clone(pauline1->identity);
|
||||
|
|
@ -679,7 +679,7 @@ static void call_with_sips_not_achievable(void){
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline1);
|
||||
linphone_core_manager_destroy(pauline2);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1079,7 +1079,7 @@ static void test_list_subscribe (void) {
|
|||
|
||||
|
||||
LinphoneEvent *lev;
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,marie->lc);
|
||||
char * pauline_uri=linphone_address_as_string_uri_only(pauline->identity);
|
||||
char * laure_uri=linphone_address_as_string_uri_only(laure->identity);
|
||||
char * subscribe_content = ms_strdup_printf(list,pauline_uri,laure_uri);
|
||||
|
|
@ -1091,8 +1091,8 @@ static void test_list_subscribe (void) {
|
|||
ms_free(pauline_uri);
|
||||
ms_free(laure_uri);
|
||||
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
lcs=bctbx_list_append(lcs,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,laure->lc);
|
||||
|
||||
linphone_content_set_type(content,"application");
|
||||
linphone_content_set_subtype(content,"resource-lists+xml");
|
||||
|
|
|
|||
|
|
@ -362,15 +362,15 @@ static void text_message_with_send_error(void) {
|
|||
linphone_chat_room_send_chat_message(chat_room,msg);
|
||||
|
||||
/* check transient msg list: the msg should be in it, and should be the only one */
|
||||
BC_ASSERT_EQUAL(ms_list_size(chat_room->transient_messages), 1, int, "%d");
|
||||
BC_ASSERT_PTR_EQUAL(ms_list_nth_data(chat_room->transient_messages,0), msg);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(chat_room->transient_messages), 1, int, "%d");
|
||||
BC_ASSERT_PTR_EQUAL(bctbx_list_nth_data(chat_room->transient_messages,0), msg);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneMessageNotDelivered,1));
|
||||
/*BC_ASSERT_EQUAL(marie->stat.number_of_LinphoneMessageInProgress,1, int, "%d");*/
|
||||
BC_ASSERT_EQUAL(pauline->stat.number_of_LinphoneMessageReceived,0, int, "%d");
|
||||
|
||||
/* the msg should have been discarded from transient list after an error */
|
||||
BC_ASSERT_EQUAL(ms_list_size(chat_room->transient_messages), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(chat_room->transient_messages), 0, int, "%d");
|
||||
|
||||
sal_set_send_error(marie->lc->sal, 0);
|
||||
|
||||
|
|
@ -396,8 +396,8 @@ static void text_message_with_external_body(void) {
|
|||
linphone_chat_room_send_chat_message(chat_room,msg);
|
||||
|
||||
/* check transient msg list: the msg should be in it, and should be the only one */
|
||||
BC_ASSERT_EQUAL(ms_list_size(chat_room->transient_messages), 1, int, "%d");
|
||||
BC_ASSERT_PTR_EQUAL(ms_list_nth_data(chat_room->transient_messages,0), msg);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(chat_room->transient_messages), 1, int, "%d");
|
||||
BC_ASSERT_PTR_EQUAL(bctbx_list_nth_data(chat_room->transient_messages,0), msg);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneMessageReceived,1));
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneMessageDelivered,1));
|
||||
|
|
@ -405,7 +405,7 @@ static void text_message_with_external_body(void) {
|
|||
BC_ASSERT_EQUAL(pauline->stat.number_of_LinphoneMessageInProgress,1, int, "%d");
|
||||
BC_ASSERT_EQUAL(marie->stat.number_of_LinphoneMessageExtBodyReceived,1, int, "%d");
|
||||
|
||||
BC_ASSERT_EQUAL(ms_list_size(chat_room->transient_messages), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(chat_room->transient_messages), 0, int, "%d");
|
||||
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
|
|
@ -615,17 +615,17 @@ static void file_transfer_2_messages_simultaneously(void) {
|
|||
cbs = linphone_chat_message_get_callbacks(msg2);
|
||||
linphone_chat_message_cbs_set_msg_state_changed(cbs,liblinphone_tester_chat_message_msg_state_changed);
|
||||
|
||||
BC_ASSERT_EQUAL(ms_list_size(linphone_core_get_chat_rooms(marie->lc)), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(linphone_core_get_chat_rooms(marie->lc)), 0, int, "%d");
|
||||
linphone_chat_room_send_chat_message(pauline_room,msg);
|
||||
linphone_chat_room_send_chat_message(pauline_room,msg2);
|
||||
if (BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneMessageReceivedWithFile,1))) {
|
||||
msg = linphone_chat_message_clone(marie->stat.last_received_chat_message);
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneMessageReceivedWithFile,2));
|
||||
msg2 = marie->stat.last_received_chat_message;
|
||||
BC_ASSERT_EQUAL(ms_list_size(linphone_core_get_chat_rooms(marie->lc)), 1, int, "%d");
|
||||
if (ms_list_size(linphone_core_get_chat_rooms(marie->lc)) != 1) {
|
||||
char * buf = ms_strdup_printf("Found %d rooms instead of 1: ", ms_list_size(linphone_core_get_chat_rooms(marie->lc)));
|
||||
const MSList *it = linphone_core_get_chat_rooms(marie->lc);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(linphone_core_get_chat_rooms(marie->lc)), 1, int, "%d");
|
||||
if (bctbx_list_size(linphone_core_get_chat_rooms(marie->lc)) != 1) {
|
||||
char * buf = ms_strdup_printf("Found %d rooms instead of 1: ", bctbx_list_size(linphone_core_get_chat_rooms(marie->lc)));
|
||||
const bctbx_list_t *it = linphone_core_get_chat_rooms(marie->lc);
|
||||
while (it) {
|
||||
const LinphoneAddress * peer = linphone_chat_room_get_peer_address(it->data);
|
||||
buf = ms_strcat_printf("%s, ", linphone_address_get_username(peer));
|
||||
|
|
@ -1155,16 +1155,16 @@ int check_no_strange_time(void* data,int argc, char** argv,char** cNames) {
|
|||
}
|
||||
|
||||
void history_message_count_helper(LinphoneChatRoom* chatroom, int x, int y, int expected ){
|
||||
MSList* messages = linphone_chat_room_get_history_range(chatroom, x, y);
|
||||
BC_ASSERT_EQUAL(ms_list_size(messages), expected, int, "%d");
|
||||
ms_list_free_with_data(messages, (void (*)(void *))linphone_chat_message_unref);
|
||||
bctbx_list_t* messages = linphone_chat_room_get_history_range(chatroom, x, y);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(messages), expected, int, "%d");
|
||||
bctbx_list_free_with_data(messages, (void (*)(void *))linphone_chat_message_unref);
|
||||
}
|
||||
|
||||
static void database_migration(void) {
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
char *src_db = bc_tester_res("messages.db");
|
||||
char *tmp_db = bc_tester_file("tmp.db");
|
||||
const MSList* chatrooms;
|
||||
const bctbx_list_t* chatrooms;
|
||||
|
||||
BC_ASSERT_EQUAL(message_tester_copy_file(src_db, tmp_db), 0, int, "%d");
|
||||
|
||||
|
|
@ -1178,7 +1178,7 @@ static void database_migration(void) {
|
|||
if (!marie->lc->db) goto end;
|
||||
|
||||
chatrooms = linphone_core_get_chat_rooms(marie->lc);
|
||||
BC_ASSERT(ms_list_size(chatrooms) > 0);
|
||||
BC_ASSERT(bctbx_list_size(chatrooms) > 0);
|
||||
|
||||
// check that all messages have been migrated to the UTC time storage
|
||||
BC_ASSERT(sqlite3_exec(marie->lc->db, "SELECT COUNT(*) FROM history WHERE time != '-1';", check_no_strange_time, NULL, NULL) == SQLITE_OK );
|
||||
|
|
@ -1238,7 +1238,7 @@ static void history_count(void) {
|
|||
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneAddress *jehan_addr = linphone_address_new("<sip:Jehan@sip.linphone.org>");
|
||||
LinphoneChatRoom *chatroom;
|
||||
MSList *messages;
|
||||
bctbx_list_t *messages;
|
||||
char *src_db = bc_tester_res("messages.db");
|
||||
char *tmp_db = bc_tester_file("tmp.db");
|
||||
|
||||
|
|
@ -1252,16 +1252,16 @@ static void history_count(void) {
|
|||
BC_ASSERT_PTR_NOT_NULL(chatroom);
|
||||
if (chatroom){
|
||||
messages=linphone_chat_room_get_history(chatroom,10);
|
||||
BC_ASSERT_EQUAL(ms_list_size(messages), 10, int, "%d");
|
||||
ms_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(messages), 10, int, "%d");
|
||||
bctbx_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
|
||||
messages=linphone_chat_room_get_history(chatroom,1);
|
||||
BC_ASSERT_EQUAL(ms_list_size(messages), 1, int, "%d");
|
||||
ms_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(messages), 1, int, "%d");
|
||||
bctbx_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
|
||||
messages=linphone_chat_room_get_history(chatroom,0);
|
||||
BC_ASSERT_EQUAL(linphone_chat_room_get_history_size(chatroom), 1270, int, "%d");
|
||||
BC_ASSERT_EQUAL(ms_list_size(messages), 1270, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(messages), 1270, int, "%d");
|
||||
|
||||
/*check the second most recent msg*/
|
||||
BC_ASSERT_PTR_NOT_NULL(messages);
|
||||
|
|
@ -1272,28 +1272,28 @@ static void history_count(void) {
|
|||
}
|
||||
}
|
||||
|
||||
ms_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
bctbx_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
|
||||
/*test offset+limit: retrieve the 42th latest msg only and check its content*/
|
||||
messages=linphone_chat_room_get_history_range(chatroom, 42, 42);
|
||||
BC_ASSERT_EQUAL(ms_list_size(messages), 1, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(messages), 1, int, "%d");
|
||||
BC_ASSERT_STRING_EQUAL(linphone_chat_message_get_text((LinphoneChatMessage *)messages->data), "If you open yourself to the Tao is intangible and evasive, yet prefers to keep us at the mercy of the kingdom, then all of the streams of hundreds of valleys because of its limitless possibilities.");
|
||||
ms_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
bctbx_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
|
||||
/*test offset without limit*/
|
||||
messages = linphone_chat_room_get_history_range(chatroom, 1265, -1);
|
||||
BC_ASSERT_EQUAL(ms_list_size(messages), 1270-1265, int, "%d");
|
||||
ms_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(messages), 1270-1265, int, "%d");
|
||||
bctbx_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
|
||||
/*test limit without offset*/
|
||||
messages = linphone_chat_room_get_history_range(chatroom, 0, 5);
|
||||
BC_ASSERT_EQUAL(ms_list_size(messages), 6, int, "%d");
|
||||
ms_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(messages), 6, int, "%d");
|
||||
bctbx_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
|
||||
/*test invalid start*/
|
||||
messages = linphone_chat_room_get_history_range(chatroom, 1265, 1260);
|
||||
BC_ASSERT_EQUAL(ms_list_size(messages), 1270-1265, int, "%d");
|
||||
ms_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(messages), 1270-1265, int, "%d");
|
||||
bctbx_list_free_with_data(messages, (void (*)(void*))linphone_chat_message_unref);
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -1381,7 +1381,7 @@ static void real_time_text(bool_t audio_stream_enabled, bool_t srtp_enabled, boo
|
|||
}
|
||||
|
||||
if (mess_with_marie_payload_number) {
|
||||
MSList *elem;
|
||||
bctbx_list_t *elem;
|
||||
for (elem = marie->lc->codecs_conf.text_codecs; elem != NULL; elem = elem->next) {
|
||||
PayloadType *pt = (PayloadType*)elem->data;
|
||||
if (strcasecmp(pt->mime_type, payload_type_t140.mime_type) == 0) {
|
||||
|
|
@ -1390,7 +1390,7 @@ static void real_time_text(bool_t audio_stream_enabled, bool_t srtp_enabled, boo
|
|||
}
|
||||
}
|
||||
} else if (mess_with_pauline_payload_number) {
|
||||
MSList *elem;
|
||||
bctbx_list_t *elem;
|
||||
for (elem = pauline->lc->codecs_conf.text_codecs; elem != NULL; elem = elem->next) {
|
||||
PayloadType *pt = (PayloadType*)elem->data;
|
||||
if (strcasecmp(pt->mime_type, payload_type_t140.mime_type) == 0) {
|
||||
|
|
@ -1447,16 +1447,16 @@ static void real_time_text(bool_t audio_stream_enabled, bool_t srtp_enabled, boo
|
|||
BC_ASSERT_TRUE(wait_for(pauline->lc, marie->lc, &marie->stat.number_of_LinphoneMessageReceived, 1));
|
||||
|
||||
if (sql_storage) {
|
||||
MSList *marie_messages = linphone_chat_room_get_history(marie_chat_room, 0);
|
||||
MSList *pauline_messages = linphone_chat_room_get_history(pauline_chat_room, 0);
|
||||
bctbx_list_t *marie_messages = linphone_chat_room_get_history(marie_chat_room, 0);
|
||||
bctbx_list_t *pauline_messages = linphone_chat_room_get_history(pauline_chat_room, 0);
|
||||
LinphoneChatMessage *marie_msg = NULL;
|
||||
LinphoneChatMessage *pauline_msg = NULL;
|
||||
if (do_not_store_rtt_messages_in_sql_storage) {
|
||||
BC_ASSERT_EQUAL(ms_list_size(marie_messages), 0, int , "%i");
|
||||
BC_ASSERT_EQUAL(ms_list_size(pauline_messages), 0, int , "%i");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(marie_messages), 0, int , "%i");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(pauline_messages), 0, int , "%i");
|
||||
} else {
|
||||
BC_ASSERT_EQUAL(ms_list_size(marie_messages), 1, int , "%i");
|
||||
BC_ASSERT_EQUAL(ms_list_size(pauline_messages), 1, int , "%i");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(marie_messages), 1, int , "%i");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(pauline_messages), 1, int , "%i");
|
||||
if (!marie_messages || !pauline_messages) {
|
||||
goto end;
|
||||
}
|
||||
|
|
@ -1464,8 +1464,8 @@ static void real_time_text(bool_t audio_stream_enabled, bool_t srtp_enabled, boo
|
|||
pauline_msg = (LinphoneChatMessage *)pauline_messages->data;
|
||||
BC_ASSERT_STRING_EQUAL(marie_msg->message, message);
|
||||
BC_ASSERT_STRING_EQUAL(pauline_msg->message, message);
|
||||
ms_list_free_with_data(marie_messages, (void (*)(void *))linphone_chat_message_unref);
|
||||
ms_list_free_with_data(pauline_messages, (void (*)(void *))linphone_chat_message_unref);
|
||||
bctbx_list_free_with_data(marie_messages, (void (*)(void *))linphone_chat_message_unref);
|
||||
bctbx_list_free_with_data(pauline_messages, (void (*)(void *))linphone_chat_message_unref);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,13 +121,13 @@ static void subscriber_no_longer_reachable(void){
|
|||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline1 = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneFriend *lf;
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
LinphonePresenceModel * presence;
|
||||
int previous_number_of_LinphonePresenceActivityOnline=0;
|
||||
int previous_number_of_LinphonePresenceActivityOffline=0;
|
||||
|
||||
lcs = ms_list_append(lcs, marie->lc);
|
||||
lcs = ms_list_append(lcs, pauline1->lc);
|
||||
lcs = bctbx_list_append(lcs, marie->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline1->lc);
|
||||
|
||||
lp_config_set_int(marie->lc->config, "sip", "subscribe_expires", 40);
|
||||
linphone_core_set_user_agent(marie->lc, "full-presence-support", NULL);
|
||||
|
|
@ -176,7 +176,7 @@ static void subscriber_no_longer_reachable(void){
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline1);
|
||||
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -265,10 +265,10 @@ static void test_forked_subscribe_notify_publish(void) {
|
|||
LpConfig *pauline_lp;
|
||||
char* lf_identity;
|
||||
LinphoneFriend *lf;
|
||||
MSList* lcs=ms_list_append(NULL,pauline->lc);
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
lcs=ms_list_append(lcs,marie2->lc);
|
||||
bctbx_list_t* lcs=bctbx_list_append(NULL,pauline->lc);
|
||||
lcs=bctbx_list_append(lcs,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,marie->lc);
|
||||
lcs=bctbx_list_append(lcs,marie2->lc);
|
||||
linphone_core_set_user_agent(marie->lc, "full-presence-support", NULL);
|
||||
linphone_core_set_user_agent(marie2->lc, "full-presence-support", NULL);
|
||||
linphone_core_set_user_agent(pauline->lc, "full-presence-support", NULL);
|
||||
|
|
@ -334,7 +334,7 @@ static void test_presence_list_base(bool_t enable_compression) {
|
|||
const char *laure_identity;
|
||||
const char *marie_identity;
|
||||
const char *pauline_identity;
|
||||
MSList* lcs = NULL;
|
||||
bctbx_list_t* lcs = NULL;
|
||||
|
||||
laure_identity = get_identity(laure);
|
||||
marie_identity = get_identity(marie);
|
||||
|
|
@ -365,9 +365,9 @@ static void test_presence_list_base(bool_t enable_compression) {
|
|||
linphone_friend_list_unref(lfl);
|
||||
linphone_core_set_presence_model(laure->lc, linphone_core_create_presence_model_with_activity(laure->lc, LinphonePresenceActivityOnline, NULL));
|
||||
|
||||
lcs = ms_list_append(lcs, laure->lc);
|
||||
lcs = ms_list_append(lcs, marie->lc);
|
||||
lcs = ms_list_append(lcs, pauline->lc);
|
||||
lcs = bctbx_list_append(lcs, laure->lc);
|
||||
lcs = bctbx_list_append(lcs, marie->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline->lc);
|
||||
|
||||
wait_for_list(lcs, &laure->stat.number_of_NotifyPresenceReceived, 2, 4000);
|
||||
BC_ASSERT_EQUAL(laure->stat.number_of_NotifyPresenceReceived, 2, int, "%d");
|
||||
|
|
@ -497,7 +497,7 @@ static void test_presence_list_subscribe_before_publish(void) {
|
|||
LinphoneFriendList *lfl;
|
||||
LinphoneFriend *lf;
|
||||
const char *pauline_identity;
|
||||
MSList* lcs = NULL;
|
||||
bctbx_list_t* lcs = NULL;
|
||||
int dummy = 0;
|
||||
|
||||
pauline_identity = get_identity(pauline);
|
||||
|
|
@ -516,8 +516,8 @@ static void test_presence_list_subscribe_before_publish(void) {
|
|||
linphone_core_set_presence_model(laure->lc, linphone_core_create_presence_model_with_activity(laure->lc, LinphonePresenceActivityOnline, NULL));
|
||||
linphone_friend_list_update_subscriptions(linphone_core_get_default_friend_list(laure->lc), NULL, FALSE);
|
||||
|
||||
lcs = ms_list_append(lcs, laure->lc);
|
||||
lcs = ms_list_append(lcs, pauline->lc);
|
||||
lcs = bctbx_list_append(lcs, laure->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline->lc);
|
||||
|
||||
wait_for_list(lcs, &dummy, 1, 2000); /* Wait a little bit for the subscribe to happen */
|
||||
|
||||
|
|
@ -572,7 +572,7 @@ static void test_presence_list_subscribe_with_error(bool_t io_error) {
|
|||
LinphoneFriendList *lfl;
|
||||
LinphoneFriend *lf;
|
||||
const char *pauline_identity;
|
||||
MSList* lcs = NULL;
|
||||
bctbx_list_t* lcs = NULL;
|
||||
int dummy = 0;
|
||||
lp_config_set_int(laure->lc->config, "sip", "rls_presence_expires", 5);
|
||||
|
||||
|
|
@ -594,8 +594,8 @@ static void test_presence_list_subscribe_with_error(bool_t io_error) {
|
|||
linphone_friend_list_unref(lfl);
|
||||
linphone_core_set_presence_model(laure->lc, linphone_core_create_presence_model_with_activity(laure->lc, LinphonePresenceActivityOnline, NULL));
|
||||
linphone_friend_list_update_subscriptions(linphone_core_get_default_friend_list(laure->lc), NULL, FALSE);
|
||||
lcs = ms_list_append(lcs, laure->lc);
|
||||
lcs = ms_list_append(lcs, pauline->lc);
|
||||
lcs = bctbx_list_append(lcs, laure->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline->lc);
|
||||
|
||||
wait_for_list(lcs, &dummy, 1, 2000); /* Wait a little bit for the subscribe to happen */
|
||||
|
||||
|
|
|
|||
|
|
@ -449,11 +449,11 @@ static void subscribe_presence_forked(void){
|
|||
LinphoneCoreManager* pauline1 = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_tcp_rc" : "pauline_tcp_rc");
|
||||
LinphoneCoreManager* pauline2 = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_tcp_rc" : "pauline_tcp_rc");
|
||||
LinphoneFriend *lf;
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
|
||||
lcs = ms_list_append(lcs, marie->lc);
|
||||
lcs = ms_list_append(lcs, pauline1->lc);
|
||||
lcs = ms_list_append(lcs, pauline2->lc);
|
||||
lcs = bctbx_list_append(lcs, marie->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline1->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline2->lc);
|
||||
|
||||
lf = linphone_core_create_friend(marie->lc);
|
||||
linphone_friend_set_address(lf, pauline1->identity);
|
||||
|
|
@ -480,17 +480,17 @@ static void subscribe_presence_forked(void){
|
|||
linphone_core_manager_destroy(pauline1);
|
||||
linphone_core_manager_destroy(pauline2);
|
||||
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void subscribe_presence_expired(void){
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline1 = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneFriend *lf;
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
|
||||
lcs = ms_list_append(lcs, marie->lc);
|
||||
lcs = ms_list_append(lcs, pauline1->lc);
|
||||
lcs = bctbx_list_append(lcs, marie->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline1->lc);
|
||||
|
||||
lp_config_set_int(marie->lc->config, "sip", "subscribe_expires", 10);
|
||||
|
||||
|
|
@ -521,7 +521,7 @@ static void subscribe_presence_expired(void){
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline1);
|
||||
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void simple_subscribe_with_friend_from_rc(void) {
|
||||
|
|
@ -529,9 +529,9 @@ static void simple_subscribe_with_friend_from_rc(void) {
|
|||
LinphoneCoreManager *marie = presence_linphone_core_manager_new_with_rc_name("marie", "pauline_as_friend_rc");
|
||||
LinphoneFriend *pauline_as_friend;
|
||||
|
||||
BC_ASSERT_EQUAL(ms_list_size(linphone_core_get_friend_list(marie->lc)), 1, int , "%i");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(linphone_core_get_friend_list(marie->lc)), 1, int , "%i");
|
||||
|
||||
if (ms_list_size(linphone_core_get_friend_list(marie->lc))>0) {
|
||||
if (bctbx_list_size(linphone_core_get_friend_list(marie->lc))>0) {
|
||||
pauline_as_friend = (LinphoneFriend*)linphone_core_get_friend_list(marie->lc)->data;
|
||||
linphone_friend_set_address(pauline_as_friend, pauline->identity); /*hack to update addr with port number*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ static void quality_reporting_not_sent_if_call_not_started(void) {
|
|||
BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallError,1, 10000));
|
||||
BC_ASSERT_EQUAL(marie->stat.number_of_LinphoneCallError,1, int, "%d");
|
||||
|
||||
if (ms_list_size(linphone_core_get_call_logs(marie->lc))>0) {
|
||||
if (bctbx_list_size(linphone_core_get_call_logs(marie->lc))>0) {
|
||||
out_call_log=(LinphoneCallLog*)(linphone_core_get_call_logs(marie->lc)->data);
|
||||
BC_ASSERT_PTR_NOT_NULL(out_call_log);
|
||||
BC_ASSERT_EQUAL(linphone_call_log_get_status(out_call_log),LinphoneCallAborted, int, "%d");
|
||||
|
|
|
|||
|
|
@ -505,7 +505,7 @@ static LinphoneCoreManager* configure_lcm(void) {
|
|||
if (transport_supported(LinphoneTransportTls)) {
|
||||
LinphoneCoreManager *lcm=linphone_core_manager_new2( "multi_account_rc", FALSE);
|
||||
stats *counters=&lcm->stat;
|
||||
BC_ASSERT_TRUE(wait_for(lcm->lc,lcm->lc,&counters->number_of_LinphoneRegistrationOk,ms_list_size(linphone_core_get_proxy_config_list(lcm->lc))));
|
||||
BC_ASSERT_TRUE(wait_for(lcm->lc,lcm->lc,&counters->number_of_LinphoneRegistrationOk,bctbx_list_size(linphone_core_get_proxy_config_list(lcm->lc))));
|
||||
BC_ASSERT_EQUAL(counters->number_of_LinphoneRegistrationFailed,0, int, "%d");
|
||||
return lcm;
|
||||
}
|
||||
|
|
@ -541,7 +541,7 @@ static void network_state_change(void){
|
|||
static int get_number_of_udp_proxy(const LinphoneCore* lc) {
|
||||
int number_of_udp_proxy=0;
|
||||
LinphoneProxyConfig* proxy_cfg;
|
||||
const MSList* proxys;
|
||||
const bctbx_list_t* proxys;
|
||||
for (proxys=linphone_core_get_proxy_config_list(lc);proxys!=NULL;proxys=proxys->next) {
|
||||
proxy_cfg=(LinphoneProxyConfig*)proxys->data;
|
||||
if (strcmp("udp",linphone_proxy_config_get_transport(proxy_cfg))==0)
|
||||
|
|
@ -567,7 +567,7 @@ static void transport_change(void){
|
|||
register_ok=counters->number_of_LinphoneRegistrationOk;
|
||||
|
||||
number_of_udp_proxy=get_number_of_udp_proxy(lc);
|
||||
total_number_of_proxies=ms_list_size(linphone_core_get_proxy_config_list(lc));
|
||||
total_number_of_proxies=bctbx_list_size(linphone_core_get_proxy_config_list(lc));
|
||||
linphone_core_get_sip_transports(lc,&sip_tr_orig);
|
||||
|
||||
sip_tr.udp_port=sip_tr_orig.udp_port;
|
||||
|
|
@ -734,12 +734,12 @@ static void io_recv_error_late_recovery(void){
|
|||
int register_ok;
|
||||
stats* counters ;
|
||||
int number_of_udp_proxy=0;
|
||||
MSList* lcs;
|
||||
bctbx_list_t* lcs;
|
||||
lcm=linphone_core_manager_new2( "multi_account_rc",FALSE); /*to make sure iterates are not call yet*/
|
||||
lc=lcm->lc;
|
||||
sal_set_refresher_retry_after(lc->sal,1000);
|
||||
counters=&lcm->stat;
|
||||
BC_ASSERT_TRUE(wait_for(lcm->lc,lcm->lc,&counters->number_of_LinphoneRegistrationOk,ms_list_size(linphone_core_get_proxy_config_list(lcm->lc))));
|
||||
BC_ASSERT_TRUE(wait_for(lcm->lc,lcm->lc,&counters->number_of_LinphoneRegistrationOk,bctbx_list_size(linphone_core_get_proxy_config_list(lcm->lc))));
|
||||
|
||||
|
||||
counters = get_stats(lc);
|
||||
|
|
@ -752,12 +752,12 @@ static void io_recv_error_late_recovery(void){
|
|||
BC_ASSERT_TRUE(wait_for(lc,NULL,&counters->number_of_LinphoneRegistrationProgress,(register_ok-number_of_udp_proxy)+register_ok /*because 1 udp*/));
|
||||
BC_ASSERT_EQUAL(counters->number_of_LinphoneRegistrationFailed,0,int,"%d");
|
||||
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs=ms_list_append(NULL,lc),&counters->number_of_LinphoneRegistrationFailed,(register_ok-number_of_udp_proxy),sal_get_refresher_retry_after(lc->sal)+3000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs=bctbx_list_append(NULL,lc),&counters->number_of_LinphoneRegistrationFailed,(register_ok-number_of_udp_proxy),sal_get_refresher_retry_after(lc->sal)+3000));
|
||||
|
||||
sal_set_recv_error(lc->sal, 1); /*reset*/
|
||||
sal_set_send_error(lc->sal, 0);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs=ms_list_append(NULL,lc),&counters->number_of_LinphoneRegistrationOk,register_ok-number_of_udp_proxy +register_ok,sal_get_refresher_retry_after(lc->sal)+3000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs=bctbx_list_append(NULL,lc),&counters->number_of_LinphoneRegistrationOk,register_ok-number_of_udp_proxy +register_ok,sal_get_refresher_retry_after(lc->sal)+3000));
|
||||
linphone_core_manager_destroy(lcm);
|
||||
}
|
||||
}
|
||||
|
|
@ -767,7 +767,7 @@ static void io_recv_error_without_active_register(void){
|
|||
LinphoneCore* lc;
|
||||
int register_ok;
|
||||
stats* counters ;
|
||||
MSList* proxys;
|
||||
bctbx_list_t* proxys;
|
||||
int dummy=0;
|
||||
|
||||
lcm=configure_lcm();
|
||||
|
|
@ -777,13 +777,13 @@ static void io_recv_error_without_active_register(void){
|
|||
|
||||
register_ok=counters->number_of_LinphoneRegistrationOk;
|
||||
|
||||
for (proxys=ms_list_copy(linphone_core_get_proxy_config_list(lc));proxys!=NULL;proxys=proxys->next) {
|
||||
for (proxys=bctbx_list_copy(linphone_core_get_proxy_config_list(lc));proxys!=NULL;proxys=proxys->next) {
|
||||
LinphoneProxyConfig* proxy_cfg=(LinphoneProxyConfig*)proxys->data;
|
||||
linphone_proxy_config_edit(proxy_cfg);
|
||||
linphone_proxy_config_enableregister(proxy_cfg,FALSE);
|
||||
linphone_proxy_config_done(proxy_cfg);
|
||||
}
|
||||
ms_list_free(proxys);
|
||||
bctbx_list_free(proxys);
|
||||
/*wait for unregistrations*/
|
||||
BC_ASSERT_TRUE(wait_for(lc,lc,&counters->number_of_LinphoneRegistrationCleared,register_ok /*because 1 udp*/));
|
||||
|
||||
|
|
@ -791,7 +791,7 @@ static void io_recv_error_without_active_register(void){
|
|||
|
||||
/*nothing should happen because no active registration*/
|
||||
wait_for_until(lc,lc, &dummy, 1, 3000);
|
||||
BC_ASSERT_EQUAL(counters->number_of_LinphoneRegistrationProgress, ms_list_size(linphone_core_get_proxy_config_list(lc)), int, "%d");
|
||||
BC_ASSERT_EQUAL(counters->number_of_LinphoneRegistrationProgress, bctbx_list_size(linphone_core_get_proxy_config_list(lc)), int, "%d");
|
||||
|
||||
BC_ASSERT_EQUAL(counters->number_of_LinphoneRegistrationFailed,0,int,"%d");
|
||||
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ end:
|
|||
static void codec_setup(void){
|
||||
LinphoneCoreManager *mgr = linphone_core_manager_new2("empty_rc", FALSE);
|
||||
PayloadType *vp8, *h264;
|
||||
const MSList *codecs;
|
||||
const bctbx_list_t *codecs;
|
||||
if ((vp8 = linphone_core_find_payload_type(mgr->lc, "VP8", 90000, -1)) == NULL ||
|
||||
(h264 = linphone_core_find_payload_type(mgr->lc, "H264", 90000, -1)) == NULL){
|
||||
linphone_core_manager_destroy(mgr);
|
||||
|
|
@ -347,7 +347,7 @@ static void codec_setup(void){
|
|||
return;
|
||||
}
|
||||
codecs = linphone_core_get_video_codecs(mgr->lc);
|
||||
BC_ASSERT_TRUE(ms_list_size(codecs)>=2);
|
||||
BC_ASSERT_TRUE(bctbx_list_size(codecs)>=2);
|
||||
BC_ASSERT_TRUE(codecs->data == vp8);
|
||||
BC_ASSERT_TRUE(codecs->next->data == h264);
|
||||
linphone_core_manager_destroy(mgr);
|
||||
|
|
@ -356,7 +356,7 @@ static void codec_setup(void){
|
|||
vp8 = linphone_core_find_payload_type(mgr->lc, "VP8", 90000, -1);
|
||||
h264 = linphone_core_find_payload_type(mgr->lc, "H264", 90000, -1);
|
||||
codecs = linphone_core_get_video_codecs(mgr->lc);
|
||||
BC_ASSERT_TRUE(ms_list_size(codecs)>=2);
|
||||
BC_ASSERT_TRUE(bctbx_list_size(codecs)>=2);
|
||||
BC_ASSERT_PTR_NOT_NULL(vp8);
|
||||
BC_ASSERT_PTR_NOT_NULL(h264);
|
||||
BC_ASSERT_TRUE(codecs->data == vp8);
|
||||
|
|
@ -367,7 +367,7 @@ static void codec_setup(void){
|
|||
vp8 = linphone_core_find_payload_type(mgr->lc, "VP8", 90000, -1);
|
||||
h264 = linphone_core_find_payload_type(mgr->lc, "H264", 90000, -1);
|
||||
codecs = linphone_core_get_video_codecs(mgr->lc);
|
||||
BC_ASSERT_TRUE(ms_list_size(codecs)>=2);
|
||||
BC_ASSERT_TRUE(bctbx_list_size(codecs)>=2);
|
||||
BC_ASSERT_PTR_NOT_NULL(vp8);
|
||||
BC_ASSERT_PTR_NOT_NULL(h264);
|
||||
BC_ASSERT_TRUE(codecs->data == vp8);
|
||||
|
|
|
|||
|
|
@ -127,12 +127,12 @@ static void ice_turn_call_base(bool_t video_enabled, bool_t forced_relay, bool_t
|
|||
LinphoneCall *lcall;
|
||||
LinphoneIceState expected_ice_state = LinphoneIceStateHostConnection;
|
||||
LinphoneMediaDirection expected_video_dir = LinphoneMediaDirectionInactive;
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
|
||||
marie = linphone_core_manager_new("marie_rc");
|
||||
lcs = ms_list_append(lcs, marie->lc);
|
||||
lcs = bctbx_list_append(lcs, marie->lc);
|
||||
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
lcs = ms_list_append(lcs, pauline->lc);
|
||||
lcs = bctbx_list_append(lcs, pauline->lc);
|
||||
|
||||
configure_nat_policy(marie->lc, caller_turn_enabled);
|
||||
configure_nat_policy(pauline->lc, callee_turn_enabled);
|
||||
|
|
@ -180,7 +180,7 @@ static void ice_turn_call_base(bool_t video_enabled, bool_t forced_relay, bool_t
|
|||
|
||||
linphone_core_manager_destroy(pauline);
|
||||
linphone_core_manager_destroy(marie);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
}
|
||||
|
||||
static void basic_ice_turn_call(void) {
|
||||
|
|
|
|||
|
|
@ -173,14 +173,14 @@ LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char* path, c
|
|||
|
||||
|
||||
bool_t wait_for_until(LinphoneCore* lc_1, LinphoneCore* lc_2,int* counter,int value,int timout) {
|
||||
MSList* lcs=NULL;
|
||||
bctbx_list_t* lcs=NULL;
|
||||
bool_t result;
|
||||
if (lc_1)
|
||||
lcs=ms_list_append(lcs,lc_1);
|
||||
lcs=bctbx_list_append(lcs,lc_1);
|
||||
if (lc_2)
|
||||
lcs=ms_list_append(lcs,lc_2);
|
||||
lcs=bctbx_list_append(lcs,lc_2);
|
||||
result=wait_for_list(lcs,counter,value,timout);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -188,8 +188,8 @@ bool_t wait_for(LinphoneCore* lc_1, LinphoneCore* lc_2,int* counter,int value) {
|
|||
return wait_for_until(lc_1, lc_2,counter,value,10000);
|
||||
}
|
||||
|
||||
bool_t wait_for_list(MSList* lcs,int* counter,int value,int timeout_ms) {
|
||||
MSList* iterator;
|
||||
bool_t wait_for_list(bctbx_list_t* lcs,int* counter,int value,int timeout_ms) {
|
||||
bctbx_list_t* iterator;
|
||||
MSTimeSpec start;
|
||||
|
||||
liblinphone_tester_clock_start(&start);
|
||||
|
|
@ -229,8 +229,8 @@ bool_t wait_for_stun_resolution(LinphoneCoreManager *m) {
|
|||
}
|
||||
|
||||
static void set_codec_enable(LinphoneCore* lc,const char* type,int rate,bool_t enable) {
|
||||
MSList* codecs=ms_list_copy(linphone_core_get_audio_codecs(lc));
|
||||
MSList* codecs_it;
|
||||
bctbx_list_t* codecs=bctbx_list_copy(linphone_core_get_audio_codecs(lc));
|
||||
bctbx_list_t* codecs_it;
|
||||
PayloadType* pt;
|
||||
for (codecs_it=codecs;codecs_it!=NULL;codecs_it=codecs_it->next) {
|
||||
linphone_core_enable_payload_type(lc,(PayloadType*)codecs_it->data,0);
|
||||
|
|
@ -238,7 +238,7 @@ static void set_codec_enable(LinphoneCore* lc,const char* type,int rate,bool_t e
|
|||
if ((pt = linphone_core_find_payload_type(lc,type,rate,1))) {
|
||||
linphone_core_enable_payload_type(lc,pt, enable);
|
||||
}
|
||||
ms_list_free(codecs);
|
||||
bctbx_list_free(codecs);
|
||||
}
|
||||
|
||||
static void enable_codec(LinphoneCore* lc,const char* type,int rate) {
|
||||
|
|
@ -350,9 +350,9 @@ void linphone_core_manager_start(LinphoneCoreManager *mgr, int check_for_proxies
|
|||
LinphoneNatPolicy *nat_policy;
|
||||
int proxy_count;
|
||||
|
||||
/*BC_ASSERT_EQUAL(ms_list_size(linphone_core_get_proxy_config_list(lc)),proxy_count, int, "%d");*/
|
||||
/*BC_ASSERT_EQUAL(bctbx_list_size(linphone_core_get_proxy_config_list(lc)),proxy_count, int, "%d");*/
|
||||
if (check_for_proxies){ /**/
|
||||
proxy_count=ms_list_size(linphone_core_get_proxy_config_list(mgr->lc));
|
||||
proxy_count=bctbx_list_size(linphone_core_get_proxy_config_list(mgr->lc));
|
||||
}else{
|
||||
proxy_count=0;
|
||||
/*this is to prevent registration to go on*/
|
||||
|
|
|
|||
|
|
@ -30,16 +30,16 @@
|
|||
static void linphone_vcard_import_export_friends_test(void) {
|
||||
LinphoneCoreManager* manager = linphone_core_manager_new2("empty_rc", FALSE);
|
||||
LinphoneFriendList *lfl = linphone_core_get_default_friend_list(manager->lc);
|
||||
const MSList *friends = linphone_friend_list_get_friends(lfl);
|
||||
const bctbx_list_t *friends = linphone_friend_list_get_friends(lfl);
|
||||
char *import_filepath = bc_tester_res("vcards/vcards.vcf");
|
||||
char *export_filepath = bc_tester_file("export_vcards.vcf");
|
||||
int count = 0;
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends), 0, int, "%d");
|
||||
|
||||
count = linphone_friend_list_import_friends_from_vcard4_file(lfl, import_filepath);
|
||||
BC_ASSERT_EQUAL(count, 3, int, "%d");
|
||||
friends = linphone_friend_list_get_friends(lfl);
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends), 3, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends), 3, int, "%d");
|
||||
|
||||
linphone_friend_list_export_friends_as_vcard4_file(lfl, export_filepath);
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ static void linphone_vcard_import_export_friends_test(void) {
|
|||
count = linphone_friend_list_import_friends_from_vcard4_file(lfl, export_filepath);
|
||||
BC_ASSERT_EQUAL(count, 3, int, "%d");
|
||||
friends = linphone_friend_list_get_friends(lfl);
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends), 3, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends), 3, int, "%d");
|
||||
linphone_friend_list_unref(lfl);
|
||||
|
||||
remove(export_filepath);
|
||||
|
|
@ -62,7 +62,7 @@ static void linphone_vcard_import_a_lot_of_friends_test(void) {
|
|||
char *import_filepath = bc_tester_res("vcards/thousand_vcards.vcf");
|
||||
clock_t start, end;
|
||||
double elapsed = 0;
|
||||
const MSList *friends = NULL;
|
||||
const bctbx_list_t *friends = NULL;
|
||||
FILE *infile = NULL;
|
||||
char *buffer = NULL;
|
||||
long numbytes = 0;
|
||||
|
|
@ -72,10 +72,10 @@ static void linphone_vcard_import_a_lot_of_friends_test(void) {
|
|||
end = clock();
|
||||
|
||||
friends = linphone_friend_list_get_friends(lfl);
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends), 482, int, "%i"); // Thousand vcards contains 482 contacts with a SIP URI
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends), 482, int, "%i"); // Thousand vcards contains 482 contacts with a SIP URI
|
||||
|
||||
elapsed = (double)(end - start);
|
||||
ms_error("Imported a thousand of vCards from file (only %u friends with SIP address found) in %f seconds", (unsigned int)ms_list_size(friends), elapsed / CLOCKS_PER_SEC);
|
||||
ms_error("Imported a thousand of vCards from file (only %u friends with SIP address found) in %f seconds", (unsigned int)bctbx_list_size(friends), elapsed / CLOCKS_PER_SEC);
|
||||
|
||||
lfl = linphone_core_create_friend_list(manager->lc);
|
||||
infile = fopen(import_filepath, "rb");
|
||||
|
|
@ -95,10 +95,10 @@ static void linphone_vcard_import_a_lot_of_friends_test(void) {
|
|||
}
|
||||
|
||||
friends = linphone_friend_list_get_friends(lfl);
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends), 482, int, "%i"); // Thousand vcards contains 482 contacts with a SIP URI
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends), 482, int, "%i"); // Thousand vcards contains 482 contacts with a SIP URI
|
||||
|
||||
elapsed = (double)(end - start);
|
||||
ms_error("Imported a thousand of vCards from buffer (only %u friends with SIP address found) in %f seconds", (unsigned int)ms_list_size(friends), elapsed / CLOCKS_PER_SEC);
|
||||
ms_error("Imported a thousand of vCards from buffer (only %u friends with SIP address found) in %f seconds", (unsigned int)bctbx_list_size(friends), elapsed / CLOCKS_PER_SEC);
|
||||
|
||||
linphone_friend_list_unref(lfl);
|
||||
|
||||
|
|
@ -125,14 +125,14 @@ static void linphone_vcard_update_existing_friends_test(void) {
|
|||
static void linphone_vcard_phone_numbers_and_sip_addresses(void) {
|
||||
LinphoneVcard *lvc = linphone_vcard_new_from_vcard4_buffer("BEGIN:VCARD\r\nVERSION:4.0\r\nFN:Sylvain Berfini\r\nIMPP:sip:sberfini@sip.linphone.org\r\nIMPP;TYPE=home:sip:sylvain@sip.linphone.org\r\nTEL;TYPE=work:0952636505\r\nEND:VCARD\r\n");
|
||||
LinphoneFriend *lf = linphone_friend_new_from_vcard(lvc);
|
||||
MSList *sip_addresses = linphone_friend_get_addresses(lf);
|
||||
MSList *phone_numbers = linphone_friend_get_phone_numbers(lf);
|
||||
bctbx_list_t *sip_addresses = linphone_friend_get_addresses(lf);
|
||||
bctbx_list_t *phone_numbers = linphone_friend_get_phone_numbers(lf);
|
||||
LinphoneAddress *addr = NULL;
|
||||
|
||||
BC_ASSERT_EQUAL(ms_list_size(sip_addresses), 2, int, "%i");
|
||||
BC_ASSERT_EQUAL(ms_list_size(phone_numbers), 1, int, "%i");
|
||||
if (sip_addresses) ms_list_free_with_data(sip_addresses, (void (*)(void *))linphone_address_unref);
|
||||
if (phone_numbers) ms_list_free(phone_numbers);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(sip_addresses), 2, int, "%i");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(phone_numbers), 1, int, "%i");
|
||||
if (sip_addresses) bctbx_list_free_with_data(sip_addresses, (void (*)(void *))linphone_address_unref);
|
||||
if (phone_numbers) bctbx_list_free(phone_numbers);
|
||||
linphone_friend_unref(lf);
|
||||
|
||||
lvc = linphone_vcard_new_from_vcard4_buffer("BEGIN:VCARD\r\nVERSION:4.0\r\nFN:Sylvain Berfini\r\nTEL;TYPE=work:0952636505\r\nTEL:0476010203\r\nEND:VCARD\r\n");
|
||||
|
|
@ -140,39 +140,39 @@ static void linphone_vcard_phone_numbers_and_sip_addresses(void) {
|
|||
sip_addresses = linphone_friend_get_addresses(lf);
|
||||
phone_numbers = linphone_friend_get_phone_numbers(lf);
|
||||
|
||||
BC_ASSERT_EQUAL(ms_list_size(sip_addresses), 0, int, "%i");
|
||||
BC_ASSERT_EQUAL(ms_list_size(phone_numbers), 2, int, "%i");
|
||||
if (sip_addresses) ms_list_free_with_data(sip_addresses, (void (*)(void *))linphone_address_unref);
|
||||
if (phone_numbers) ms_list_free(phone_numbers);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(sip_addresses), 0, int, "%i");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(phone_numbers), 2, int, "%i");
|
||||
if (sip_addresses) bctbx_list_free_with_data(sip_addresses, (void (*)(void *))linphone_address_unref);
|
||||
if (phone_numbers) bctbx_list_free(phone_numbers);
|
||||
|
||||
addr = linphone_address_new("sip:sylvain@sip.linphone.org");
|
||||
linphone_friend_add_address(lf, addr);
|
||||
linphone_address_unref(addr);
|
||||
sip_addresses = linphone_friend_get_addresses(lf);
|
||||
BC_ASSERT_EQUAL(ms_list_size(sip_addresses), 1, int, "%i");
|
||||
if (sip_addresses) ms_list_free_with_data(sip_addresses, (void (*)(void *))linphone_address_unref);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(sip_addresses), 1, int, "%i");
|
||||
if (sip_addresses) bctbx_list_free_with_data(sip_addresses, (void (*)(void *))linphone_address_unref);
|
||||
|
||||
linphone_friend_remove_phone_number(lf, "0952636505");
|
||||
phone_numbers = linphone_friend_get_phone_numbers(lf);
|
||||
BC_ASSERT_EQUAL(ms_list_size(phone_numbers), 1, int, "%i");
|
||||
if (phone_numbers) ms_list_free(phone_numbers);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(phone_numbers), 1, int, "%i");
|
||||
if (phone_numbers) bctbx_list_free(phone_numbers);
|
||||
|
||||
linphone_friend_remove_phone_number(lf, "0476010203");
|
||||
phone_numbers = linphone_friend_get_phone_numbers(lf);
|
||||
BC_ASSERT_EQUAL(ms_list_size(phone_numbers), 0, int, "%i");
|
||||
if (phone_numbers) ms_list_free(phone_numbers);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(phone_numbers), 0, int, "%i");
|
||||
if (phone_numbers) bctbx_list_free(phone_numbers);
|
||||
|
||||
addr = linphone_address_new("sip:sylvain@sip.linphone.org");
|
||||
linphone_friend_remove_address(lf, addr);
|
||||
linphone_address_unref(addr);
|
||||
sip_addresses = linphone_friend_get_addresses(lf);
|
||||
BC_ASSERT_EQUAL(ms_list_size(sip_addresses), 0, int, "%i");
|
||||
if (sip_addresses) ms_list_free_with_data(sip_addresses, (void (*)(void *))linphone_address_unref);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(sip_addresses), 0, int, "%i");
|
||||
if (sip_addresses) bctbx_list_free_with_data(sip_addresses, (void (*)(void *))linphone_address_unref);
|
||||
|
||||
linphone_friend_add_phone_number(lf, "+33952636505");
|
||||
phone_numbers = linphone_friend_get_phone_numbers(lf);
|
||||
BC_ASSERT_EQUAL(ms_list_size(phone_numbers), 1, int, "%i");
|
||||
if (phone_numbers) ms_list_free(phone_numbers);
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(phone_numbers), 1, int, "%i");
|
||||
if (phone_numbers) bctbx_list_free(phone_numbers);
|
||||
|
||||
linphone_friend_unref(lf);
|
||||
lf = NULL;
|
||||
|
|
@ -184,19 +184,19 @@ static void friends_if_no_db_set(void) {
|
|||
LinphoneCoreManager* manager = linphone_core_manager_new2("empty_rc", FALSE);
|
||||
LinphoneFriend *lf = linphone_core_create_friend(manager->lc);
|
||||
LinphoneAddress *addr = linphone_address_new("sip:sylvain@sip.linphone.org");
|
||||
const MSList *friends = NULL;
|
||||
const bctbx_list_t *friends = NULL;
|
||||
LinphoneFriendList *lfl = linphone_core_create_friend_list(manager->lc);
|
||||
|
||||
linphone_friend_set_address(lf, addr);
|
||||
linphone_friend_set_name(lf, "Sylvain");
|
||||
linphone_friend_list_add_friend(lfl, lf);
|
||||
friends = linphone_friend_list_get_friends(lfl);
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends), 1, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends), 1, int, "%d");
|
||||
|
||||
linphone_friend_list_remove_friend(lfl, lf);
|
||||
linphone_friend_unref(lf);
|
||||
friends = linphone_friend_list_get_friends(lfl);
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends), 0, int, "%d");
|
||||
|
||||
linphone_friend_list_unref(lfl);
|
||||
linphone_address_unref(addr);
|
||||
|
|
@ -207,22 +207,22 @@ static void friends_migration(void) {
|
|||
LinphoneCoreManager* manager = linphone_core_manager_new2("friends_rc", FALSE);
|
||||
LpConfig *lpc = linphone_core_get_config(manager->lc);
|
||||
LinphoneFriendList *lfl = linphone_core_get_default_friend_list(manager->lc);
|
||||
const MSList *friends = linphone_friend_list_get_friends(lfl);
|
||||
MSList *friends_from_db = NULL;
|
||||
const bctbx_list_t *friends = linphone_friend_list_get_friends(lfl);
|
||||
bctbx_list_t *friends_from_db = NULL;
|
||||
char *friends_db = bc_tester_file("friends.db");
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends), 3, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends), 3, int, "%d");
|
||||
BC_ASSERT_EQUAL(lp_config_get_int(lpc, "misc", "friends_migration_done", 0), 0, int, "%i");
|
||||
|
||||
unlink(friends_db);
|
||||
linphone_core_set_friends_database_path(manager->lc, friends_db);
|
||||
lfl = linphone_core_get_default_friend_list(manager->lc);
|
||||
friends = linphone_friend_list_get_friends(lfl);
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends), 3, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends), 3, int, "%d");
|
||||
friends_from_db = linphone_core_fetch_friends_from_db(manager->lc, lfl);
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends_from_db), 3, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends_from_db), 3, int, "%d");
|
||||
BC_ASSERT_EQUAL(lp_config_get_int(lpc, "misc", "friends_migration_done", 0), 1, int, "%i");
|
||||
|
||||
friends_from_db = ms_list_free_with_data(friends_from_db, (void (*)(void *))linphone_friend_unref);
|
||||
friends_from_db = bctbx_list_free_with_data(friends_from_db, (void (*)(void *))linphone_friend_unref);
|
||||
unlink(friends_db);
|
||||
ms_free(friends_db);
|
||||
linphone_core_manager_destroy(manager);
|
||||
|
|
@ -255,9 +255,9 @@ static void friends_sqlite_storage(void) {
|
|||
LinphoneFriend *lf2 = NULL;
|
||||
LinphoneVcard *lvc = linphone_vcard_new();
|
||||
LinphoneAddress *addr = linphone_address_new("sip:sylvain@sip.linphone.org");
|
||||
const MSList *friends = NULL;
|
||||
MSList *friends_from_db = NULL;
|
||||
MSList *friends_lists_from_db = NULL;
|
||||
const bctbx_list_t *friends = NULL;
|
||||
bctbx_list_t *friends_from_db = NULL;
|
||||
bctbx_list_t *friends_lists_from_db = NULL;
|
||||
char *friends_db = bc_tester_file("friends.db");
|
||||
LinphoneFriendListStats *stats = (LinphoneFriendListStats *)ms_new0(LinphoneFriendListStats, 1);
|
||||
|
||||
|
|
@ -267,12 +267,12 @@ static void friends_sqlite_storage(void) {
|
|||
friends = linphone_friend_list_get_friends(linphone_core_get_default_friend_list(lc));
|
||||
lfl = linphone_core_create_friend_list(lc);
|
||||
linphone_friend_list_set_user_data(lfl, stats);
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends), 0, int, "%d");
|
||||
|
||||
unlink(friends_db);
|
||||
linphone_core_set_friends_database_path(lc, friends_db);
|
||||
friends_from_db = linphone_core_fetch_friends_from_db(lc, linphone_core_get_default_friend_list(lc));
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends_from_db), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends_from_db), 0, int, "%d");
|
||||
|
||||
linphone_vcard_set_etag(lvc, "\"123-456789\"");
|
||||
linphone_vcard_set_url(lvc, "http://dav.somewhere.fr/addressbook/me/someone.vcf");
|
||||
|
|
@ -291,20 +291,20 @@ static void friends_sqlite_storage(void) {
|
|||
BC_ASSERT_EQUAL(lf->storage_id, 1, unsigned int, "%u");
|
||||
|
||||
friends = linphone_friend_list_get_friends(linphone_core_get_default_friend_list(lc));
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends), 0, int, "%d");
|
||||
|
||||
friends_lists_from_db = linphone_core_fetch_friends_lists_from_db(lc);
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends_lists_from_db), 1, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends_lists_from_db), 1, int, "%d");
|
||||
friends_from_db = ((LinphoneFriendList *)friends_lists_from_db->data)->friends;
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends_from_db), 1, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends_from_db), 1, int, "%d");
|
||||
lf2 = (LinphoneFriend *)friends_from_db->data;
|
||||
BC_ASSERT_PTR_NOT_NULL(lf2->lc);
|
||||
BC_ASSERT_PTR_NOT_NULL(lf2->friend_list);
|
||||
friends_lists_from_db = ms_list_free_with_data(friends_lists_from_db, (void (*)(void *))linphone_friend_list_unref);
|
||||
friends_lists_from_db = bctbx_list_free_with_data(friends_lists_from_db, (void (*)(void *))linphone_friend_list_unref);
|
||||
|
||||
friends_from_db = linphone_core_fetch_friends_from_db(lc, lfl);
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends_from_db), 1, int, "%d");
|
||||
if (ms_list_size(friends_from_db) < 1) {
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends_from_db), 1, int, "%d");
|
||||
if (bctbx_list_size(friends_from_db) < 1) {
|
||||
goto end;
|
||||
}
|
||||
lf2 = (LinphoneFriend *)friends_from_db->data;
|
||||
|
|
@ -317,21 +317,21 @@ static void friends_sqlite_storage(void) {
|
|||
linphone_friend_edit(lf);
|
||||
linphone_friend_set_name(lf, "Margaux");
|
||||
linphone_friend_done(lf);
|
||||
friends_from_db = ms_list_free_with_data(friends_from_db, (void (*)(void *))linphone_friend_unref);
|
||||
friends_from_db = bctbx_list_free_with_data(friends_from_db, (void (*)(void *))linphone_friend_unref);
|
||||
friends_from_db = linphone_core_fetch_friends_from_db(lc, lfl);
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends_from_db), 1, int, "%d");
|
||||
if (ms_list_size(friends_from_db) < 1) {
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends_from_db), 1, int, "%d");
|
||||
if (bctbx_list_size(friends_from_db) < 1) {
|
||||
goto end;
|
||||
}
|
||||
lf2 = (LinphoneFriend *)friends_from_db->data;
|
||||
BC_ASSERT_STRING_EQUAL(linphone_friend_get_name(lf2), "Margaux");
|
||||
friends_from_db = ms_list_free_with_data(friends_from_db, (void (*)(void *))linphone_friend_unref);
|
||||
friends_from_db = bctbx_list_free_with_data(friends_from_db, (void (*)(void *))linphone_friend_unref);
|
||||
|
||||
linphone_friend_list_remove_friend(lfl, lf);
|
||||
friends = linphone_friend_list_get_friends(linphone_core_get_default_friend_list(lc));
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends), 0, int, "%d");
|
||||
friends_from_db = linphone_core_fetch_friends_from_db(lc, lfl);
|
||||
BC_ASSERT_EQUAL(ms_list_size(friends_from_db), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(friends_from_db), 0, int, "%d");
|
||||
|
||||
linphone_core_remove_friend_list(lc, lfl);
|
||||
wait_for_until(lc, NULL, &stats->removed_list_count, 1, 1000);
|
||||
|
|
@ -571,15 +571,15 @@ static void carddav_integration(void) {
|
|||
linphone_core_add_friend_list(manager->lc, lfl);
|
||||
|
||||
BC_ASSERT_PTR_NULL(linphone_vcard_get_uid(lvc));
|
||||
BC_ASSERT_EQUAL(ms_list_size(lfl->dirty_friends_to_update), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(lfl->dirty_friends_to_update), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(linphone_friend_list_add_friend(lfl, lf), LinphoneFriendListOK, int, "%d");
|
||||
BC_ASSERT_EQUAL(ms_list_size(lfl->dirty_friends_to_update), 1, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(lfl->dirty_friends_to_update), 1, int, "%d");
|
||||
wait_for_until(manager->lc, NULL, &stats->sync_done_count, 1, 5000);
|
||||
BC_ASSERT_EQUAL(stats->sync_done_count, 1, int, "%i");
|
||||
BC_ASSERT_EQUAL(ms_list_size(lfl->dirty_friends_to_update), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(lfl->dirty_friends_to_update), 0, int, "%d");
|
||||
BC_ASSERT_PTR_NOT_NULL(linphone_vcard_get_uid(lvc));
|
||||
linphone_friend_list_remove_friend(lfl, lf);
|
||||
BC_ASSERT_EQUAL(ms_list_size(lfl->friends), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(lfl->friends), 0, int, "%d");
|
||||
wait_for_until(manager->lc, NULL, &stats->sync_done_count, 2, 5000);
|
||||
BC_ASSERT_EQUAL(stats->sync_done_count, 2, int, "%i");
|
||||
linphone_friend_unref(lf);
|
||||
|
|
@ -608,7 +608,7 @@ static void carddav_integration(void) {
|
|||
wait_for_until(manager->lc, NULL, &stats->sync_done_count, 3, 5000);
|
||||
BC_ASSERT_EQUAL(stats->sync_done_count, 3, int, "%i");
|
||||
|
||||
BC_ASSERT_EQUAL(ms_list_size(lfl->friends), 1, int, "%i");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(lfl->friends), 1, int, "%i");
|
||||
lf = (LinphoneFriend *)lfl->friends->data;
|
||||
BC_ASSERT_STRING_EQUAL(lf->refkey, refkey);
|
||||
BC_ASSERT_EQUAL(lf->storage_id, lf2->storage_id, unsigned int, "%u");
|
||||
|
|
@ -617,13 +617,13 @@ static void carddav_integration(void) {
|
|||
|
||||
linphone_friend_edit(lf);
|
||||
linphone_friend_done(lf);
|
||||
BC_ASSERT_EQUAL(ms_list_size(lf->friend_list->dirty_friends_to_update), 0, int, "%i");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(lf->friend_list->dirty_friends_to_update), 0, int, "%i");
|
||||
|
||||
linphone_core_set_network_reachable(manager->lc, FALSE); //To prevent the CardDAV update
|
||||
linphone_friend_edit(lf);
|
||||
linphone_friend_set_name(lf, "François Grisez");
|
||||
linphone_friend_done(lf);
|
||||
BC_ASSERT_EQUAL(ms_list_size(lf->friend_list->dirty_friends_to_update), 1, int, "%i");
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(lf->friend_list->dirty_friends_to_update), 1, int, "%i");
|
||||
|
||||
ms_free(stats);
|
||||
linphone_friend_list_unref(lfl);
|
||||
|
|
@ -635,8 +635,8 @@ static void carddav_clean(void) { // This is to ensure the content of the test
|
|||
LinphoneFriendList *lfl = linphone_core_create_friend_list(manager->lc);
|
||||
LinphoneFriendListCbs *cbs = linphone_friend_list_get_callbacks(lfl);
|
||||
LinphoneCardDAVStats *stats = (LinphoneCardDAVStats *)ms_new0(LinphoneCardDAVStats, 1);
|
||||
MSList *friends = NULL;
|
||||
MSList *friends_iterator = NULL;
|
||||
bctbx_list_t *friends = NULL;
|
||||
bctbx_list_t *friends_iterator = NULL;
|
||||
LinphoneFriend *lf = NULL;
|
||||
LinphoneVcard *lvc = NULL;
|
||||
|
||||
|
|
@ -653,7 +653,7 @@ static void carddav_clean(void) { // This is to ensure the content of the test
|
|||
BC_ASSERT_EQUAL(stats->sync_done_count, 1, int, "%i");
|
||||
stats->sync_done_count = 0;
|
||||
|
||||
friends = ms_list_copy(lfl->friends);
|
||||
friends = bctbx_list_copy(lfl->friends);
|
||||
friends_iterator = friends;
|
||||
while (friends_iterator) {
|
||||
LinphoneFriend *lf = (LinphoneFriend *)friends_iterator->data;
|
||||
|
|
@ -662,9 +662,9 @@ static void carddav_clean(void) { // This is to ensure the content of the test
|
|||
BC_ASSERT_EQUAL(stats->sync_done_count, 1, int, "%i");
|
||||
stats->sync_done_count = 0;
|
||||
stats->removed_contact_count = 0;
|
||||
friends_iterator = ms_list_next(friends_iterator);
|
||||
friends_iterator = bctbx_list_next(friends_iterator);
|
||||
}
|
||||
ms_list_free(friends);
|
||||
bctbx_list_free(friends);
|
||||
|
||||
lvc = linphone_vcard_new_from_vcard4_buffer("BEGIN:VCARD\r\nVERSION:4.0\r\nFN:Sylvain Berfini\r\nIMPP:sip:sylvain@sip.linphone.org\r\nUID:1f08dd48-29ac-4097-8e48-8596d7776283\r\nEND:VCARD\r\n");
|
||||
linphone_vcard_set_url(lvc, "http://dav.linphone.org/card.php/addressbooks/tester/default/me.vcf");
|
||||
|
|
@ -718,7 +718,7 @@ static void carddav_server_to_client_and_client_to_sever_sync(void) {
|
|||
LinphoneFriend *lf1 = linphone_friend_new_from_vcard(lvc1);
|
||||
LinphoneVcard *lvc2 = linphone_vcard_new_from_vcard4_buffer("BEGIN:VCARD\r\nVERSION:4.0\r\nFN:Ghislain Mary\r\nIMPP;TYPE=work:sip:ghislain@sip.linphone.org\r\nEND:VCARD\r\n");
|
||||
LinphoneFriend *lf2 = linphone_friend_new_from_vcard(lvc2);
|
||||
MSList *friends = NULL, *friends_iterator = NULL;
|
||||
bctbx_list_t *friends = NULL, *friends_iterator = NULL;
|
||||
|
||||
linphone_friend_list_cbs_set_user_data(cbs, stats);
|
||||
linphone_friend_list_cbs_set_contact_created(cbs, carddav_contact_created);
|
||||
|
|
@ -737,7 +737,7 @@ static void carddav_server_to_client_and_client_to_sever_sync(void) {
|
|||
BC_ASSERT_EQUAL(stats->sync_done_count, 3, int, "%i");
|
||||
|
||||
stats->sync_done_count = 0;
|
||||
friends = ms_list_copy(lfl->friends);
|
||||
friends = bctbx_list_copy(lfl->friends);
|
||||
friends_iterator = friends;
|
||||
while (friends_iterator) {
|
||||
LinphoneFriend *lf = (LinphoneFriend *)friends_iterator->data;
|
||||
|
|
@ -747,9 +747,9 @@ static void carddav_server_to_client_and_client_to_sever_sync(void) {
|
|||
BC_ASSERT_EQUAL(stats->sync_done_count, 1, int, "%i");
|
||||
stats->sync_done_count = 0;
|
||||
}
|
||||
friends_iterator = ms_list_next(friends_iterator);
|
||||
friends_iterator = bctbx_list_next(friends_iterator);
|
||||
}
|
||||
ms_list_free(friends);
|
||||
bctbx_list_free(friends);
|
||||
|
||||
ms_free(stats);
|
||||
linphone_friend_list_unref(lfl);
|
||||
|
|
|
|||
|
|
@ -160,14 +160,14 @@ static void early_media_video_call_state_changed_with_inactive_audio(LinphoneCor
|
|||
}
|
||||
|
||||
bool_t wait_for_three_cores(LinphoneCore *lc1, LinphoneCore *lc2, LinphoneCore *lc3, int timeout) {
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
bool_t result;
|
||||
int dummy = 0;
|
||||
if (lc1) lcs = ms_list_append(lcs, lc1);
|
||||
if (lc2) lcs = ms_list_append(lcs, lc2);
|
||||
if (lc3) lcs = ms_list_append(lcs, lc3);
|
||||
if (lc1) lcs = bctbx_list_append(lcs, lc1);
|
||||
if (lc2) lcs = bctbx_list_append(lcs, lc2);
|
||||
if (lc3) lcs = bctbx_list_append(lcs, lc3);
|
||||
result = wait_for_list(lcs, &dummy, 1, timeout);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -305,7 +305,7 @@ static void two_incoming_early_media_video_calls_test(void) {
|
|||
LinphoneCallParams *pauline_params;
|
||||
LinphoneCallParams *laure_params;
|
||||
LinphoneCall *call;
|
||||
const MSList *calls_list;
|
||||
const bctbx_list_t *calls_list;
|
||||
|
||||
marie = linphone_core_manager_new("marie_rc");
|
||||
pauline = linphone_core_manager_new("pauline_tcp_rc");
|
||||
|
|
@ -335,7 +335,7 @@ static void two_incoming_early_media_video_calls_test(void) {
|
|||
BC_ASSERT_EQUAL(linphone_core_get_calls_nb(marie->lc), 2, int, "%d");
|
||||
if (linphone_core_get_calls_nb(marie->lc) == 2) {
|
||||
calls_list = linphone_core_get_calls(marie->lc);
|
||||
call = (LinphoneCall *)ms_list_nth_data(calls_list, 0);
|
||||
call = (LinphoneCall *)bctbx_list_nth_data(calls_list, 0);
|
||||
BC_ASSERT_PTR_NOT_NULL(call);
|
||||
if (call != NULL) {
|
||||
LinphoneCallParams *params = linphone_call_params_copy(linphone_call_get_current_params(call));
|
||||
|
|
@ -409,7 +409,7 @@ static void forked_outgoing_early_media_video_call_with_inactive_audio_test(void
|
|||
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_tcp_rc");
|
||||
LinphoneCoreManager *marie1 = linphone_core_manager_new("marie_early_rc");
|
||||
LinphoneCoreManager *marie2 = linphone_core_manager_new("marie_early_rc");
|
||||
MSList *lcs = NULL;
|
||||
bctbx_list_t *lcs = NULL;
|
||||
LinphoneCallParams *pauline_params;
|
||||
LinphoneCallParams *marie1_params;
|
||||
LinphoneCallParams *marie2_params;
|
||||
|
|
@ -433,9 +433,9 @@ static void forked_outgoing_early_media_video_call_with_inactive_audio_test(void
|
|||
linphone_core_set_audio_port_range(marie2->lc, 40200, 40300);
|
||||
linphone_core_set_video_port_range(marie2->lc, 40400, 40500);
|
||||
|
||||
lcs = ms_list_append(lcs,marie1->lc);
|
||||
lcs = ms_list_append(lcs,marie2->lc);
|
||||
lcs = ms_list_append(lcs,pauline->lc);
|
||||
lcs = bctbx_list_append(lcs,marie1->lc);
|
||||
lcs = bctbx_list_append(lcs,marie2->lc);
|
||||
lcs = bctbx_list_append(lcs,pauline->lc);
|
||||
|
||||
pauline_params = linphone_core_create_call_params(pauline->lc, NULL);
|
||||
linphone_call_params_enable_early_media_sending(pauline_params, TRUE);
|
||||
|
|
@ -511,7 +511,7 @@ static void forked_outgoing_early_media_video_call_with_inactive_audio_test(void
|
|||
|
||||
linphone_call_params_destroy(marie1_params);
|
||||
linphone_call_params_destroy(marie2_params);
|
||||
ms_list_free(lcs);
|
||||
bctbx_list_free(lcs);
|
||||
linphone_core_manager_destroy(marie1);
|
||||
linphone_core_manager_destroy(marie2);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
|
|
|
|||
|
|
@ -184,13 +184,13 @@ int main(int argc, char *argv[]){
|
|||
|
||||
/* main loop for receiving notifications and doing background linphonecore work: */
|
||||
while(running){
|
||||
const MSList * iterator;
|
||||
const bctbx_list_t * iterator;
|
||||
linphone_core_iterate(lc);
|
||||
ms_usleep(50000);
|
||||
if (print_stats) {
|
||||
ms_message("*********************************");
|
||||
ms_message("*Current number of calls [%10u] *", (unsigned int)ms_list_size(linphone_core_get_calls(lc)));
|
||||
ms_message("*Number of calls until now [%10u] *", (unsigned int)ms_list_size(linphone_core_get_call_logs(lc)));
|
||||
ms_message("*Current number of calls [%10u] *", (unsigned int)bctbx_list_size(linphone_core_get_calls(lc)));
|
||||
ms_message("*Number of calls until now [%10u] *", (unsigned int)bctbx_list_size(linphone_core_get_call_logs(lc)));
|
||||
ms_message("*********************************");
|
||||
print_stats=FALSE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue