Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
06de47db
Commit
06de47db
authored
Nov 26, 2014
by
Guillaume BIENKOWSKI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a special case in message history retrieval.
This function is not yet completely tested,
parent
96ca18f8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
coreapi/message_storage.c
coreapi/message_storage.c
+1
-1
tester/message_tester.c
tester/message_tester.c
+4
-0
No files found.
coreapi/message_storage.c
View file @
06de47db
...
...
@@ -371,7 +371,7 @@ MSList *linphone_chat_room_get_history_range(LinphoneChatRoom *cr, int startm, i
if
(
startm
<
0
)
startm
=
0
;
if
(
endm
>
0
&&
endm
>=
startm
){
if
(
(
endm
>
0
&&
endm
>=
startm
)
||
(
startm
==
0
&&
endm
==
0
)
)
{
buf2
=
ms_strdup_printf
(
"%s LIMIT %i "
,
buf
,
endm
+
1
-
startm
);
ms_free
(
buf
);
buf
=
buf2
;
...
...
tester/message_tester.c
View file @
06de47db
...
...
@@ -1045,6 +1045,10 @@ static void history_messages_count() {
CU_ASSERT_EQUAL
(
ms_list_size
(
messages
),
10
);
ms_list_free_with_data
(
messages
,
(
void
(
*
)(
void
*
))
linphone_chat_message_unref
);
messages
=
linphone_chat_room_get_history
(
chatroom
,
1
);
CU_ASSERT_EQUAL
(
ms_list_size
(
messages
),
1
);
ms_list_free_with_data
(
messages
,
(
void
(
*
)(
void
*
))
linphone_chat_message_unref
);
messages
=
linphone_chat_room_get_history
(
chatroom
,
0
);
CU_ASSERT_EQUAL
(
linphone_chat_room_get_history_size
(
chatroom
),
1270
);
CU_ASSERT_EQUAL
(
ms_list_size
(
messages
),
1270
);
...
...
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