mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-30 17:43:57 +01:00
Fix dialyzer warnings
This commit is contained in:
parent
45bbbd0284
commit
e462f0a584
@ -578,7 +578,7 @@ update_wildcard_cache(Host, Group, NewOpts) ->
|
|||||||
_ -> Online -- [Group]
|
_ -> Online -- [Group]
|
||||||
end,
|
end,
|
||||||
ets_cache:update(?SPECIAL_GROUPS_CACHE, {Host, online},
|
ets_cache:update(?SPECIAL_GROUPS_CACHE, {Host, online},
|
||||||
NewOnline, fun() -> ok end, cache_nodes(Mod, Host));
|
{ok, NewOnline}, fun() -> ok end, cache_nodes(Mod, Host));
|
||||||
true -> ok
|
true -> ok
|
||||||
end,
|
end,
|
||||||
if
|
if
|
||||||
@ -588,13 +588,14 @@ update_wildcard_cache(Host, Group, NewOpts) ->
|
|||||||
_ -> Both -- [Group]
|
_ -> Both -- [Group]
|
||||||
end,
|
end,
|
||||||
ets_cache:update(?SPECIAL_GROUPS_CACHE, {Host, both},
|
ets_cache:update(?SPECIAL_GROUPS_CACHE, {Host, both},
|
||||||
NewBoth, fun() -> ok end, cache_nodes(Mod, Host));
|
{ok, NewBoth}, fun() -> ok end, cache_nodes(Mod, Host));
|
||||||
true -> ok
|
true -> ok
|
||||||
end,
|
end,
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
-spec get_groups_with_wildcards(binary(), online | both) -> list(binary()).
|
-spec get_groups_with_wildcards(binary(), online | both) -> list(binary()).
|
||||||
get_groups_with_wildcards(Host, Type) ->
|
get_groups_with_wildcards(Host, Type) ->
|
||||||
|
Res =
|
||||||
ets_cache:lookup(
|
ets_cache:lookup(
|
||||||
?SPECIAL_GROUPS_CACHE, {Host, Type},
|
?SPECIAL_GROUPS_CACHE, {Host, Type},
|
||||||
fun() ->
|
fun() ->
|
||||||
@ -607,8 +608,12 @@ get_groups_with_wildcards(Host, Type) ->
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
groups_with_opts(Host)),
|
groups_with_opts(Host)),
|
||||||
{cache, Res}
|
{cache, {ok, Res}}
|
||||||
end).
|
end),
|
||||||
|
case Res of
|
||||||
|
{ok, List} -> List;
|
||||||
|
_ -> []
|
||||||
|
end.
|
||||||
|
|
||||||
%% Given two lists of groupnames and their options,
|
%% Given two lists of groupnames and their options,
|
||||||
%% return the list of displayed groups to the second list
|
%% return the list of displayed groups to the second list
|
||||||
|
Loading…
Reference in New Issue
Block a user