aboutsummaryrefslogtreecommitdiff
path: root/src/mod_multicast.erl
diff options
context:
space:
mode:
authorKonstantinos Kallas <konstantinos.kallas@hotmail.com>2017-08-19 13:42:05 +0300
committerKonstantinos Kallas <konstantinos.kallas@hotmail.com>2017-08-19 13:42:05 +0300
commitf581e391ac71106090c8a79ba915b614cf833587 (patch)
treef80098cdbc46fcebbd039ab69c0000798b8f23ca /src/mod_multicast.erl
parentMerge remove_account_option branch (diff)
parentApply cosmetic changes to previous commit (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/mod_multicast.erl')
-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}].