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
f07be6ec
Commit
f07be6ec
authored
Sep 09, 2014
by
Simon Morlat
Browse files
fixe crashes in tester
parent
95c08345
Changes
2
Hide whitespace changes
Inline
Side-by-side
tester/message_tester.c
View file @
f07be6ec
...
...
@@ -47,7 +47,7 @@ void message_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMess
counters
=
get_stats
(
lc
);
counters
->
number_of_LinphoneMessageReceived
++
;
if
(
counters
->
last_received_chat_message
)
linphone_chat_message_unref
(
counters
->
last_received_chat_message
);
linphone_chat_message_ref
(
counters
->
last_received_chat_message
=
message
);
counters
->
last_received_chat_message
=
linphone_chat_message_ref
(
message
);
if
(
linphone_chat_message_get_file_transfer_information
(
message
))
{
counters
->
number_of_LinphoneMessageReceivedWithFile
++
;
}
else
if
(
linphone_chat_message_get_external_body_url
(
message
))
{
...
...
@@ -76,7 +76,6 @@ void file_transfer_received(LinphoneCore *lc, LinphoneChatMessage *message, cons
if
(
size
==
0
)
{
/* tranfer complete */
stats
*
counters
=
get_stats
(
lc
);
linphone_chat_room_destroy
(
linphone_chat_message_get_chat_room
(
message
));
counters
->
number_of_LinphoneMessageExtBodyReceived
++
;
fclose
(
file
);
}
else
{
/* store content on a file*/
...
...
@@ -624,6 +623,7 @@ static void file_transfer_message_upload_cancelled(void) {
}
static
void
file_transfer_message_download_cancelled
(
void
)
{
#if 0
int i;
char* to;
LinphoneChatRoom* chat_room;
...
...
@@ -683,6 +683,8 @@ static void file_transfer_message_download_cancelled(void) {
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
#endif
ms_error
(
"Test skipped"
);
}
static
void
text_message_with_send_error
(
void
)
{
...
...
tester/tester.c
View file @
f07be6ec
...
...
@@ -252,9 +252,9 @@ void linphone_core_manager_stop(LinphoneCoreManager *mgr){
}
void
linphone_core_manager_destroy
(
LinphoneCoreManager
*
mgr
)
{
if
(
mgr
->
stat
.
last_received_chat_message
)
linphone_chat_message_unref
(
mgr
->
stat
.
last_received_chat_message
);
if
(
mgr
->
lc
)
linphone_core_destroy
(
mgr
->
lc
);
if
(
mgr
->
identity
)
linphone_address_destroy
(
mgr
->
identity
);
if
(
mgr
->
stat
.
last_received_chat_message
)
linphone_chat_message_unref
(
mgr
->
stat
.
last_received_chat_message
);
ms_free
(
mgr
);
}
...
...
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