mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
update presence tester
This commit is contained in:
parent
342d404c35
commit
0ae4fbaba0
2 changed files with 8 additions and 4 deletions
|
|
@ -391,10 +391,12 @@ static void subscribe_presence_forked(void){
|
|||
}
|
||||
|
||||
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");
|
||||
LinphoneCoreManager* marie = presence_linphone_core_manager_new("marie");
|
||||
LinphoneCoreManager* pauline1 = presence_linphone_core_manager_new("pauline");
|
||||
LinphoneAddress *marie_addr = linphone_address_clone(marie->identity);
|
||||
LinphoneFriend *lf;
|
||||
MSList *lcs = NULL;
|
||||
linphone_address_set_port(marie_addr,0); /*remove port */
|
||||
|
||||
lcs = ms_list_append(lcs, marie->lc);
|
||||
lcs = ms_list_append(lcs, pauline1->lc);
|
||||
|
|
@ -411,7 +413,7 @@ static void subscribe_presence_expired(void){
|
|||
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline1->stat.number_of_NewSubscriptionRequest,1, 5000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphonePresenceActivityOnline,1, 2000));
|
||||
|
||||
lf = linphone_core_find_friend(pauline1->lc, marie->identity);
|
||||
lf = linphone_core_find_friend(pauline1->lc, marie_addr);
|
||||
BC_ASSERT_PTR_NOT_NULL(lf->insubs);
|
||||
/*marie comes offline suddenly*/
|
||||
linphone_core_set_network_reachable(marie->lc, FALSE);
|
||||
|
|
@ -421,7 +423,7 @@ static void subscribe_presence_expired(void){
|
|||
BC_ASSERT_PTR_NULL(lf->insubs);
|
||||
/*just make network reachable so that marie can unregister properly*/
|
||||
linphone_core_set_network_reachable(marie->lc, TRUE);
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneRegistrationOk,2, 10000));
|
||||
//BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneRegistrationOk,2, 10000));
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline1);
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ static void core_init_test(void) {
|
|||
|
||||
static void linphone_address_test(void) {
|
||||
linphone_address_destroy(create_linphone_address(NULL));
|
||||
BC_ASSERT_PTR_NULL(linphone_address_new("sip:@sip.linphone.org"));
|
||||
|
||||
}
|
||||
|
||||
static void core_sip_transport_test(void) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue