Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
cbf99ae5
Commit
cbf99ae5
authored
Sep 12, 2013
by
jehan
Browse files
fix presence test
parent
26c8f6ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
tester/presence_tester.c
tester/presence_tester.c
+5
-7
No files found.
tester/presence_tester.c
View file @
cbf99ae5
...
...
@@ -203,8 +203,6 @@ static void simple_subscribe(void) {
CU_ASSERT_TRUE
(
subscribe_to_callee_presence
(
marie
,
pauline
));
linphone_core_manager_destroy
(
marie
);
CU_ASSERT_FALSE
(
wait_for
(
NULL
,
pauline
->
lc
,
&
pauline
->
stat
.
number_of_NewSubscriptionRequest
,
2
));
/*just to wait for unsubscription even if not notified*/
...
...
@@ -262,7 +260,7 @@ static void presence_information(void) {
/* Presence activity without description. */
presence
=
linphone_presence_model_new_with_activity
(
LinphonePresenceActivityDinner
,
NULL
);
linphone_core_set_presence_model
(
pauline
->
lc
,
presence
);
wait_
c
or
e
(
marie
->
lc
);
wait_
f
or
(
marie
->
lc
,
pauline
->
lc
,
&
marie
->
stat
.
number_of_LinphonePresenceActivityDinner
,
1
);
CU_ASSERT_EQUAL
(
marie
->
stat
.
number_of_LinphonePresenceActivityDinner
,
1
);
activity
=
linphone_presence_model_get_activity
(
marie
->
stat
.
last_received_presence
);
CU_ASSERT_PTR_NOT_NULL
(
activity
);
...
...
@@ -273,7 +271,7 @@ static void presence_information(void) {
/* Presence activity with description. */
presence
=
linphone_presence_model_new_with_activity
(
LinphonePresenceActivitySteering
,
bike_description
);
linphone_core_set_presence_model
(
pauline
->
lc
,
presence
);
wait_
c
or
e
(
marie
->
lc
);
wait_
f
or
(
marie
->
lc
,
pauline
->
lc
,
&
marie
->
stat
.
number_of_LinphonePresenceActivitySteering
,
1
);
CU_ASSERT_EQUAL
(
marie
->
stat
.
number_of_LinphonePresenceActivitySteering
,
1
);
activity
=
linphone_presence_model_get_activity
(
marie
->
stat
.
last_received_presence
);
CU_ASSERT_PTR_NOT_NULL
(
activity
);
...
...
@@ -285,7 +283,7 @@ static void presence_information(void) {
/* Presence activity with description and note. */
presence
=
linphone_presence_model_new_with_activity_and_note
(
LinphonePresenceActivityVacation
,
NULL
,
vacation_note
,
vacation_lang
);
linphone_core_set_presence_model
(
pauline
->
lc
,
presence
);
wait_
c
or
e
(
marie
->
lc
);
wait_
f
or
(
marie
->
lc
,
pauline
->
lc
,
&
marie
->
stat
.
number_of_LinphonePresenceActivityVacation
,
1
);
CU_ASSERT_EQUAL
(
marie
->
stat
.
number_of_LinphonePresenceActivityVacation
,
1
);
activity
=
linphone_presence_model_get_activity
(
marie
->
stat
.
last_received_presence
);
CU_ASSERT_PTR_NOT_NULL
(
activity
);
...
...
@@ -306,7 +304,7 @@ static void presence_information(void) {
presence
=
linphone_presence_model_new_with_activity
(
LinphonePresenceActivityOnThePhone
,
NULL
);
linphone_presence_model_set_contact
(
presence
,
contact
);
linphone_core_set_presence_model
(
pauline
->
lc
,
presence
);
wait_
c
or
e
(
marie
->
lc
);
wait_
f
or
(
marie
->
lc
,
pauline
->
lc
,
&
marie
->
stat
.
number_of_LinphonePresenceActivityOnThePhone
,
1
);
CU_ASSERT_EQUAL
(
marie
->
stat
.
number_of_LinphonePresenceActivityOnThePhone
,
1
);
contact2
=
linphone_presence_model_get_contact
(
presence
);
CU_ASSERT_PTR_NOT_NULL
(
contact2
);
...
...
@@ -319,7 +317,7 @@ static void presence_information(void) {
current_timestamp
=
time
(
NULL
);
presence
=
linphone_presence_model_new_with_activity
(
LinphonePresenceActivityShopping
,
NULL
);
linphone_core_set_presence_model
(
pauline
->
lc
,
presence
);
wait_
c
or
e
(
marie
->
lc
);
wait_
f
or
(
marie
->
lc
,
pauline
->
lc
,
&
marie
->
stat
.
number_of_LinphonePresenceActivityShopping
,
1
);
CU_ASSERT_EQUAL
(
marie
->
stat
.
number_of_LinphonePresenceActivityShopping
,
1
);
presence_timestamp
=
linphone_presence_model_get_timestamp
(
presence
);
CU_ASSERT_TRUE
(
presence_timestamp
>=
current_timestamp
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment