aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2017-08-18 14:09:49 +0200
committerBadlop <badlop@process-one.net>2017-08-18 14:09:49 +0200
commit0b02d428368a70350eeca3f9a60ec55489a944b0 (patch)
treeff2592682b803b64c705a9521d4805a11894bf8c /src
parentPreserve correct order of deserialized XML elements (diff)
Fix mod_multicast start and reading of configured limits (#1949)
Diffstat (limited to 'src')
-rw-r--r--src/mod_multicast.erl14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mod_multicast.erl b/src/mod_multicast.erl
index 4d3e481a7..e10315b7a 100644
--- a/src/mod_multicast.erl
+++ b/src/mod_multicast.erl
@@ -998,8 +998,10 @@ build_service_limit_record(LimitOpts) ->
build_limit_record(LimitOptsR, remote)}.
get_from_limitopts(LimitOpts, SenderT) ->
- {SenderT, Result} = lists:keyfind(SenderT, 1, LimitOpts),
- Result.
+ case lists:keyfind(SenderT, 1, LimitOpts) of
+ false -> [];
+ {SenderT, Result} -> Result
+ end.
build_remote_limit_record(LimitOpts, SenderT) ->
build_limit_record(LimitOpts, SenderT).
@@ -1120,10 +1122,10 @@ mod_opt_type(host) -> fun iolist_to_binary/1;
mod_opt_type({limits, Type}) when (Type == local) or (Type == remote) ->
fun(L) ->
lists:map(
- fun ({message, infinite}) -> infinite;
- ({presence, infinite}) -> infinite;
- ({message, I}) when is_integer(I) -> I;
- ({presence, I}) when is_integer(I) -> I
+ fun ({message, infinite} = O) -> O;
+ ({presence, infinite} = O) -> O;
+ ({message, I} = O) when is_integer(I) -> O;
+ ({presence, I} = O) when is_integer(I) -> O
end, L)
end;
mod_opt_type(_) -> [access, host, {limits, local}, {limits, remote}].