mod_pubsub: Fix get_max_items_node/1 specification

Make it explicit that the get_max_items_node/1 function returns
?MAXITEMS if the 'max_items_node' option isn't specified.  The function
didn't actually fall back to 'undefined' (but to the 'max_items_node'
default; i.e., ?MAXITEMS) anyway.  This change just clarifies the
behavior and adjusts the function specification accordingly.
This commit is contained in:
Holger Weiss 2021-10-30 13:45:10 +02:00
parent 29dcc9b94c
commit 2f1611f918
1 changed files with 2 additions and 2 deletions

View File

@ -3579,9 +3579,9 @@ check_opt_range(Opt, Opts, Max) ->
Val -> Val =< Max
end.
-spec get_max_items_node(host()) -> undefined | unlimited | non_neg_integer().
-spec get_max_items_node(host()) -> unlimited | non_neg_integer().
get_max_items_node(Host) ->
config(Host, max_items_node, undefined).
config(Host, max_items_node, ?MAXITEMS).
-spec get_max_item_expire_node(host()) -> infinity | non_neg_integer().
get_max_item_expire_node(Host) ->