Skip to content

Commit

Permalink
simple implementation: does it work? does it the proper thing?
Browse files Browse the repository at this point in the history
  • Loading branch information
badlop committed May 24, 2024
1 parent 65f53e3 commit 2ac01c7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/ejabberd_sql_schema.erl
Original file line number Diff line number Diff line change
Expand Up @@ -780,15 +780,11 @@ should_update_schema(Host) ->
true ->
?INFO_MSG("SQL Schema: should_update_schema for ~p - 3", [Host]), %+++
%% TODO: not efficient when there are many hosts
case lists:search(
fun(H) ->
lists:member(
sql, ejabberd_option:auth_method(H))
end, ejabberd_option:hosts()) of
{value, Host} ->
case lists:member(sql, ejabberd_option:auth_method(Host)) of
true ->
?INFO_MSG("SQL Schema: should_update_schema for ~p - 4", [Host]), %+++
true;
_ ->
false ->
Hosts = ejabberd_option:hosts(),
Results = [{H, ejabberd_option:auth_method(H)} || H <- ejabberd_option:hosts()],
?INFO_MSG("SQL Schema: should_update_schema for ~p - 4 NO~n Hosts: ~p~n Results: ~p", [Host, Hosts, Results]), %+++
Expand Down

0 comments on commit 2ac01c7

Please sign in to comment.