mirror of
https://github.com/processone/ejabberd
synced 2025-10-06 12:00:15 +02:00
fix error handling when sql calling with unknown host.
This commit is contained in:
parent
ce22239d85
commit
a6408e9281
2 changed files with 2 additions and 1 deletions
|
@ -212,6 +212,7 @@ is_user_exists(User, Server) ->
|
|||
true; %% Account exists
|
||||
{selected, [<<"password">>], []} ->
|
||||
false; %% Account does not exist
|
||||
{error, unknownhost} -> false;
|
||||
{error, Error} -> {error, Error}
|
||||
catch
|
||||
_:B -> {error, B}
|
||||
|
|
|
@ -141,7 +141,7 @@ sql_call(Host, Msg) ->
|
|||
case get(?STATE_KEY) of
|
||||
undefined ->
|
||||
case ejabberd_odbc_sup:get_random_pid(Host) of
|
||||
none -> ?WARNING_MSG("SQL calling unknown host: ~p~n", [Host]);
|
||||
none -> {error, unknownhost};
|
||||
Pid ->
|
||||
(?GEN_FSM):sync_send_event(Pid,{sql_cmd, Msg, now()},
|
||||
?TRANSACTION_TIMEOUT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue