presence_tester: fix long term presence list test

This commit is contained in:
Gautier Pelloux-Prayer 2016-04-15 14:46:21 +02:00
parent 5faff1286e
commit e8697d9b0b

View file

@ -1089,8 +1089,8 @@ static void long_term_presence_inexistent_friend(void) {
static void long_term_presence_list(void) { static void long_term_presence_list(void) {
LinphoneFriend *f1, *f2; LinphoneFriend *f1, *f2;
LinphoneFriendList* friends; LinphoneFriendList* friends;
LinphoneCoreManager* pauline = presence_linphone_core_manager_new("pauline"); LinphoneCoreManager *pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
linphone_core_set_user_agent(pauline->lc, "full-presence-support", NULL); enable_publish(pauline, TRUE);
enable_deflate_content_encoding(pauline, FALSE); enable_deflate_content_encoding(pauline, FALSE);
friends = linphone_core_create_friend_list(pauline->lc); friends = linphone_core_create_friend_list(pauline->lc);
@ -1105,8 +1105,8 @@ static void long_term_presence_list(void) {
linphone_core_add_friend_list(pauline->lc, friends); linphone_core_add_friend_list(pauline->lc, friends);
linphone_friend_list_unref(friends); linphone_friend_list_unref(friends);
BC_ASSERT_TRUE(wait_for(pauline->lc,NULL,&pauline->stat.number_of_NotifyPresenceReceived,2)); BC_ASSERT_TRUE(wait_for(pauline->lc,NULL,&pauline->stat.number_of_NotifyPresenceReceived,1));
BC_ASSERT_EQUAL(linphone_core_get_default_friend_list(pauline->lc)->expected_notification_version, 1, int, "%d"); BC_ASSERT_EQUAL(linphone_core_get_default_friend_list(pauline->lc)->expected_notification_version, 2, int, "%d");
f1 = linphone_friend_list_find_friend_by_uri(linphone_core_get_default_friend_list(pauline->lc), "sip:liblinphone_tester@sip.example.org"); f1 = linphone_friend_list_find_friend_by_uri(linphone_core_get_default_friend_list(pauline->lc), "sip:liblinphone_tester@sip.example.org");
BC_ASSERT_EQUAL(linphone_presence_model_get_basic_status(linphone_friend_get_presence_model(f1)), LinphonePresenceBasicStatusOpen, int, "%d"); BC_ASSERT_EQUAL(linphone_presence_model_get_basic_status(linphone_friend_get_presence_model(f1)), LinphonePresenceBasicStatusOpen, int, "%d");