add test for // REGISTER sent for same account with configured realm

This commit is contained in:
Jehan Monnier 2015-04-29 11:47:47 +02:00
parent 1baa97a7f7
commit 705384ebb4
3 changed files with 15 additions and 2 deletions

View file

@ -1413,8 +1413,11 @@ void linphone_call_unref(LinphoneCall *obj){
belle_sip_object_unref(obj);
}
static unsigned int linphone_call_get_n_active_streams(const LinphoneCall *call) {
SalMediaDescription *md = sal_call_get_remote_media_description(call->op);
if (!md) return 0;
SalMediaDescription *md=NULL;
if (call->op)
md = sal_call_get_remote_media_description(call->op);
if (!md)
return 0;
return sal_media_description_nb_active_streams_of_type(md, SalAudio) + sal_media_description_nb_active_streams_of_type(md, SalVideo);
}

View file

@ -51,5 +51,14 @@ reg_expires=3600
reg_sendregister=1
publish=0
dial_escape_plus=0
realm=auth1.example.org
[proxy_3]
reg_proxy=auth1.example.org
reg_identity=sip:liblinphone_tester@auth1.example.org
reg_expires=600
reg_sendregister=1
publish=0
dial_escape_plus=0
realm=auth1.example.org

View file

@ -461,6 +461,7 @@ static LinphoneCoreManager* configure_lcm(void) {
LinphoneCoreManager *mgr=linphone_core_manager_new( "multi_account_rc");
stats *counters=&mgr->stat;
CU_ASSERT_TRUE(wait_for(mgr->lc,mgr->lc,&counters->number_of_LinphoneRegistrationOk,ms_list_size(linphone_core_get_proxy_config_list(mgr->lc))));
CU_ASSERT_EQUAL(counters->number_of_LinphoneRegistrationFailed,0);
return mgr;
}