25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Replace jlib:nameprep/1 by exmpp_stringprep:nameprep/1 and change the

error handling.

PR:		EJABP-1

SVN Revision: 1628
This commit is contained in:
Jean-Sébastien Pédron 2008-10-10 15:24:47 +00:00
parent 71bfefa788
commit 4a9892fa15
2 changed files with 13 additions and 7 deletions

View File

@ -10,8 +10,9 @@
* src/ejabberd_s2s_in.erl (wait_for_feature_request/2), * src/ejabberd_s2s_in.erl (wait_for_feature_request/2),
src/ejabberd_router.erl (register_route/2, unregister_route/1), src/ejabberd_router.erl (register_route/2, unregister_route/1),
src/ejabberd_ctl.erl (process/1): Replace jlib:nameprep/1 by src/ejabberd_ctl.erl (process/1), src/ejabberd_rdbms.erl
exmpp_stringprep:nameprep/1 and change the error handling. (needs_odbc/1): Replace jlib:nameprep/1 by exmpp_stringprep:nameprep/1
and change the error handling.
* src/ejabberd_config.erl (normalize_hosts/2): Replace jlib:nodeprep/1 * src/ejabberd_config.erl (normalize_hosts/2): Replace jlib:nodeprep/1
by exmpp_stringprep:nodeprep/1 and change the error handling. by exmpp_stringprep:nodeprep/1 and change the error handling.

View File

@ -70,9 +70,14 @@ start_odbc(Host) ->
%% Returns true if we have configured odbc_server for the given host %% Returns true if we have configured odbc_server for the given host
needs_odbc(Host) -> needs_odbc(Host) ->
LHost = jlib:nameprep(Host), try
LHost = exmpp_stringprep:nameprep(Host),
case ejabberd_config:get_local_option({odbc_server, LHost}) of case ejabberd_config:get_local_option({odbc_server, LHost}) of
undefined -> undefined ->
false; false;
_ -> true _ -> true
end
catch
_ ->
false
end. end.