aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2016-07-19 21:23:30 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2016-07-19 21:23:30 +0200
commit8f8c499cfa78075b8edb41ac3683ce47b54f5f22 (patch)
treecf66bfda2bcf9b0449bc07fb6ddf3ee3c9d3321d
parentmod_mam: Always limit result set page size (diff)
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.
-rw-r--r--src/mod_mam.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mod_mam.erl b/src/mod_mam.erl
index f5dc67abc..7e1460695 100644
--- a/src/mod_mam.erl
+++ b/src/mod_mam.erl
@@ -1037,7 +1037,9 @@ limit_max(none, _NS) ->
limit_max(#rsm_in{max = Max} = RSM, _NS) when not is_integer(Max) ->
RSM#rsm_in{max = ?DEF_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) ->
(Now >= Start) and (Now =< End).