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
79585f6b
Commit
79585f6b
authored
Oct 29, 2018
by
Ghislain MARY
Committed by
jehan
Nov 20, 2018
Browse files
Fix message tester.
parent
25e9ca4d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/chat/chat-message/chat-message.cpp
src/chat/chat-message/chat-message.cpp
+1
-1
tester/message_tester.c
tester/message_tester.c
+3
-4
No files found.
src/chat/chat-message/chat-message.cpp
View file @
79585f6b
...
...
@@ -165,7 +165,7 @@ void ChatMessagePrivate::setState (ChatMessage::State newState) {
// 4. Send notification and update in database if necessary.
if
(
state
!=
ChatMessage
::
State
::
FileTransferError
&&
state
!=
ChatMessage
::
State
::
InProgress
)
{
if
(
state
==
ChatMessage
::
State
::
Displayed
)
if
(
(
state
==
ChatMessage
::
State
::
Displayed
)
&&
(
direction
==
ChatMessage
::
Direction
::
Incoming
))
static_cast
<
ChatRoomPrivate
*>
(
q
->
getChatRoom
()
->
getPrivate
())
->
sendDisplayNotification
(
q
->
getSharedFromThis
());
updateInDb
();
}
...
...
tester/message_tester.c
View file @
79585f6b
...
...
@@ -266,9 +266,9 @@ LinphoneChatMessage* create_file_transfer_message_from_sintel_trailer(LinphoneCh
linphone_content_set_type
(
content
,
"video"
);
linphone_content_set_subtype
(
content
,
"mkv"
);
linphone_content_set_name
(
content
,
"sintel_trailer_opus_h264.mkv"
);
linphone_content_set_file_path
(
content
,
send_filepath
);
msg
=
linphone_chat_room_create_file_transfer_message
(
chat_room
,
content
);
linphone_chat_message_set_file_transfer_filepath
(
msg
,
send_filepath
);
cbs
=
linphone_chat_message_get_callbacks
(
msg
);
linphone_chat_message_cbs_set_file_transfer_send
(
cbs
,
tester_file_transfer_send
);
linphone_chat_message_cbs_set_msg_state_changed
(
cbs
,
liblinphone_tester_chat_message_msg_state_changed
);
...
...
@@ -503,8 +503,8 @@ void transfer_message_base2(LinphoneCoreManager* marie, LinphoneCoreManager* pau
if
(
marie
->
stat
.
last_received_chat_message
)
{
LinphoneChatRoom
*
marie_room
=
linphone_core_get_chat_room
(
marie
->
lc
,
pauline
->
identity
);
linphone_chat_room_mark_as_read
(
marie_room
);
// We shoud
ln't
get display
ed IMDN until
file has been downloaded
BC_ASSERT_
FALS
E
(
wait_for_until
(
pauline
->
lc
,
marie
->
lc
,
&
pauline
->
stat
.
number_of_LinphoneMessageDisplayed
,
1
,
5000
));
// We shou
l
d get display
notification even if the
file has
not
been downloaded
yet
BC_ASSERT_
TRU
E
(
wait_for_until
(
pauline
->
lc
,
marie
->
lc
,
&
pauline
->
stat
.
number_of_LinphoneMessageDisplayed
,
1
,
5000
));
LinphoneChatMessage
*
recv_msg
;
if
(
download_from_history
)
{
...
...
@@ -531,7 +531,6 @@ void transfer_message_base2(LinphoneCoreManager* marie, LinphoneCoreManager* pau
belle_http_provider_set_recv_error
(
linphone_core_get_http_provider
(
marie
->
lc
),
-
1
);
BC_ASSERT_TRUE
(
wait_for_until
(
marie
->
lc
,
pauline
->
lc
,
&
marie
->
stat
.
number_of_LinphoneMessageNotDelivered
,
1
,
10000
));
belle_http_provider_set_recv_error
(
linphone_core_get_http_provider
(
marie
->
lc
),
0
);
BC_ASSERT_FALSE
(
wait_for_until
(
pauline
->
lc
,
marie
->
lc
,
&
pauline
->
stat
.
number_of_LinphoneMessageDisplayed
,
1
,
5000
));
}
else
{
/* wait for a long time in case the DNS SRV resolution takes times - it should be immediate though */
if
(
BC_ASSERT_TRUE
(
wait_for_until
(
pauline
->
lc
,
marie
->
lc
,
&
marie
->
stat
.
number_of_LinphoneFileTransferDownloadSuccessful
,
1
,
55000
)))
{
...
...
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