Commit 400404fc authored by Ghislain MARY's avatar Ghislain MARY

Replace MSList by bctbx_list_t in tools and tester.

parent 16bb8d78
......@@ -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){
......
This diff is collapsed.
......@@ -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
*/
......
This diff is collapsed.
......@@ -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");
......
This diff is collapsed.
This diff is collapsed.
......@@ -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*/
......
This diff is collapsed.
......@@ -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"