mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-24 17:29:28 +01:00
fixes anonymous sessions lookup
This commit is contained in:
parent
350af319bf
commit
3a7d02dbd3
@ -128,11 +128,18 @@ anonymous_user_exist(User, Server) ->
|
|||||||
LUser = jlib:nodeprep(User),
|
LUser = jlib:nodeprep(User),
|
||||||
LServer = jlib:nameprep(Server),
|
LServer = jlib:nameprep(Server),
|
||||||
US = {LUser, LServer},
|
US = {LUser, LServer},
|
||||||
case catch mnesia:dirty_read({anonymous, US}) of
|
Ss = case ejabberd_cluster:get_node(US) of
|
||||||
[] ->
|
Node when Node == node() ->
|
||||||
false;
|
catch mnesia:dirty_read({anonymous, US});
|
||||||
|
Node ->
|
||||||
|
catch rpc:call(Node, mnesia, dirty_read,
|
||||||
|
[{anonymous, US}], 5000)
|
||||||
|
end,
|
||||||
|
case Ss of
|
||||||
[_H|_T] ->
|
[_H|_T] ->
|
||||||
true
|
true;
|
||||||
|
_ ->
|
||||||
|
false
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%% Remove connection from Mnesia tables
|
%% Remove connection from Mnesia tables
|
||||||
|
Loading…
Reference in New Issue
Block a user