25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

mod_mam: Fix handling of result set page limit

Restore function clause for handling a client-specified result set page
limit that doesn't exceed mod_mam's upper threshold.
This commit is contained in:
Holger Weiss 2016-07-19 21:23:30 +02:00
parent 9fcb81dea9
commit 8f8c499cfa

View File

@ -1037,7 +1037,9 @@ limit_max(none, _NS) ->
limit_max(#rsm_in{max = Max} = RSM, _NS) when not is_integer(Max) -> limit_max(#rsm_in{max = Max} = RSM, _NS) when not is_integer(Max) ->
RSM#rsm_in{max = ?DEF_PAGE_SIZE}; RSM#rsm_in{max = ?DEF_PAGE_SIZE};
limit_max(#rsm_in{max = Max} = RSM, _NS) when Max > ?MAX_PAGE_SIZE -> limit_max(#rsm_in{max = Max} = RSM, _NS) when Max > ?MAX_PAGE_SIZE ->
RSM#rsm_in{max = ?MAX_PAGE_SIZE}. RSM#rsm_in{max = ?MAX_PAGE_SIZE};
limit_max(RSM, _NS) ->
RSM.
match_interval(Now, Start, End) -> match_interval(Now, Start, End) ->
(Now >= Start) and (Now =< End). (Now >= Start) and (Now =< End).