aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ejabberd_bosh.erl2
-rw-r--r--src/mod_last.erl2
-rw-r--r--src/mod_offline.erl8
-rw-r--r--src/mod_privacy.erl6
4 files changed, 9 insertions, 9 deletions
diff --git a/src/ejabberd_bosh.erl b/src/ejabberd_bosh.erl
index d4fc6809d..1dc103aee 100644
--- a/src/ejabberd_bosh.erl
+++ b/src/ejabberd_bosh.erl
@@ -966,7 +966,7 @@ attrs_to_body_attrs(Attrs) ->
[], Attrs).
to_int(S, Min) ->
- case jlib:binary_to_integer(S) of
+ case binary_to_integer(S) of
I when I >= Min -> I;
_ -> erlang:error(badarg)
end.
diff --git a/src/mod_last.erl b/src/mod_last.erl
index 895a8e215..463eac051 100644
--- a/src/mod_last.erl
+++ b/src/mod_last.erl
@@ -217,7 +217,7 @@ import_start(LServer, DBType) ->
import(LServer, {sql, _}, DBType, <<"last">>, [LUser, TimeStamp, State]) ->
TS = case TimeStamp of
<<"">> -> 0;
- _ -> jlib:binary_to_integer(TimeStamp)
+ _ -> binary_to_integer(TimeStamp)
end,
LA = #last_activity{us = {LUser, LServer},
timestamp = TS,
diff --git a/src/mod_offline.erl b/src/mod_offline.erl
index 241677b2a..f620e73c5 100644
--- a/src/mod_offline.erl
+++ b/src/mod_offline.erl
@@ -868,10 +868,10 @@ import(LServer, {sql, _}, DBType, <<"spool">>,
fxml:get_attr_s(<<"to">>, El#xmlel.attrs)),
Stamp = fxml:get_path_s(El, [{elem, <<"delay">>},
{attr, <<"stamp">>}]),
- TS = case jlib:datetime_string_to_timestamp(Stamp) of
- {MegaSecs, Secs, _} ->
- {MegaSecs, Secs, 0};
- undefined ->
+ TS = try xmpp_util:decode_timestamp(Stamp) of
+ {MegaSecs, Secs, _} ->
+ {MegaSecs, Secs, 0}
+ catch _:_ ->
p1_time_compat:timestamp()
end,
US = {LUser, LServer},
diff --git a/src/mod_privacy.erl b/src/mod_privacy.erl
index f1b8411d2..d6936e1b7 100644
--- a/src/mod_privacy.erl
+++ b/src/mod_privacy.erl
@@ -552,13 +552,13 @@ numeric_to_binary(<<0, _, _:6/binary, T/binary>>) ->
fun(X, Sum) ->
Sum*10000 + X
end, 0, [X || <<X:16>> <= T]),
- jlib:integer_to_binary(Res).
+ integer_to_binary(Res).
bool_to_binary(<<0>>) -> <<"0">>;
bool_to_binary(<<1>>) -> <<"1">>.
prepare_list_data(mysql, [ID|Row]) ->
- [jlib:binary_to_integer(ID)|Row];
+ [binary_to_integer(ID)|Row];
prepare_list_data(pgsql, [<<ID:64>>,
SType, SValue, SAction, SOrder, SMatchAll,
SMatchIQ, SMatchMessage, SMatchPresenceIn,
@@ -572,7 +572,7 @@ prepare_list_data(pgsql, [<<ID:64>>,
bool_to_binary(SMatchPresenceOut)].
prepare_id(mysql, ID) ->
- jlib:binary_to_integer(ID);
+ binary_to_integer(ID);
prepare_id(pgsql, <<ID:32>>) ->
ID.