mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Make JID related functions from jlib.erl deprecated
This commit is contained in:
parent
95265dd3ad
commit
87fb5132be
@ -187,7 +187,7 @@ Config = [{erl_opts, Macros ++ HiPE ++ DebugInfo ++
|
||||
++ TestConfig
|
||||
++ "-include " ++ filename:join([Cwd, "tools"])},
|
||||
{xref_warnings, false},
|
||||
{xref_checks, []},
|
||||
{xref_checks, [deprecated_function_calls]},
|
||||
{xref_queries,
|
||||
[{"(XC - UC) || (XU - X - B - "
|
||||
++ string:join(CfgXrefs, " - ") ++ ")", []}]},
|
||||
|
12
src/jlib.erl
12
src/jlib.erl
@ -62,6 +62,18 @@
|
||||
nameprep/1, resourceprep/1, jid_tolower/1,
|
||||
jid_remove_resource/1, jid_replace_resource/2]).
|
||||
|
||||
-deprecated([{make_jid, '_'},
|
||||
{split_jid, 1},
|
||||
{string_to_jid, 1},
|
||||
{jid_to_string, 1},
|
||||
{is_nodename, 1},
|
||||
{nodeprep, 1},
|
||||
{nameprep, 1},
|
||||
{resourceprep, 1},
|
||||
{jid_tolower, 1},
|
||||
{jid_remove_resource, 1},
|
||||
{jid_replace_resource, 2}]).
|
||||
|
||||
-include("ejabberd.hrl").
|
||||
-include("jlib.hrl").
|
||||
|
||||
|
@ -2533,15 +2533,15 @@ dec_bool(<<"true">>) -> true;
|
||||
dec_bool(<<"1">>) -> true.
|
||||
|
||||
resourceprep(R) ->
|
||||
case jlib:resourceprep(R) of
|
||||
case jid:resourceprep(R) of
|
||||
error -> erlang:error(badarg);
|
||||
R1 -> R1
|
||||
end.
|
||||
|
||||
enc_jid(J) -> jlib:jid_to_string(J).
|
||||
enc_jid(J) -> jid:to_string(J).
|
||||
|
||||
dec_jid(Val) ->
|
||||
case jlib:string_to_jid(Val) of
|
||||
case jid:from_string(Val) of
|
||||
error -> erlang:error(badarg);
|
||||
J -> J
|
||||
end.
|
||||
|
@ -2421,7 +2421,7 @@ enc_utc(Val) ->
|
||||
jlib:now_to_utc_string(Val).
|
||||
|
||||
dec_jid(Val) ->
|
||||
case jlib:string_to_jid(Val) of
|
||||
case jid:from_string(Val) of
|
||||
error ->
|
||||
erlang:error(badarg);
|
||||
J ->
|
||||
@ -2429,10 +2429,10 @@ dec_jid(Val) ->
|
||||
end.
|
||||
|
||||
enc_jid(J) ->
|
||||
jlib:jid_to_string(J).
|
||||
jid:to_string(J).
|
||||
|
||||
resourceprep(R) ->
|
||||
case jlib:resourceprep(R) of
|
||||
case jid:resourceprep(R) of
|
||||
error ->
|
||||
erlang:error(badarg);
|
||||
R1 ->
|
||||
|
Loading…
Reference in New Issue
Block a user