Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2014-02-28 15:32:05 +0400
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2014-02-28 15:36:34 +0400
commit4a02893dac5c00b77071edc3df5d0057edb3c562 (patch)
treed6d46d4ca2c395b9e95cc623fc7a6cec1e34e73b /tools
parentd03de1bb436760afd9cb80f51d367009985fffba (diff)
Regenerate XMPP codec
Diffstat (limited to 'tools')
-rw-r--r--tools/xmpp_codec.erl10
-rw-r--r--tools/xmpp_codec.spec4
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/xmpp_codec.erl b/tools/xmpp_codec.erl
index ff73f4259..6cfcc7a22 100644
--- a/tools/xmpp_codec.erl
+++ b/tools/xmpp_codec.erl
@@ -5,7 +5,7 @@
-compile({nowarn_unused_function,
[{dec_int, 3}, {dec_int, 1}, {dec_enum, 2},
- {enc_int, 1}, {enc_enum, 1}]}).
+ {enc_int, 1}, {get_attr, 2}, {enc_enum, 1}]}).
-export([pp/1, format_error/1, decode/1, is_known_tag/1,
encode/1]).
@@ -1580,12 +1580,12 @@ encode({last, _, _} = Query) ->
dec_int(Val) -> dec_int(Val, infinity, infinity).
dec_int(Val, Min, Max) ->
- case erlang:binary_to_integer(Val) of
+ case list_to_integer(binary_to_list(Val)) of
Int when Int =< Max, Min == infinity -> Int;
Int when Int =< Max, Int >= Min -> Int
end.
-enc_int(Int) -> erlang:integer_to_binary(Int).
+enc_int(Int) -> list_to_binary(integer_to_list(Int)).
dec_enum(Val, Enums) ->
AtomVal = erlang:binary_to_existing_atom(Val, utf8),
@@ -1787,8 +1787,8 @@ enc_tzo({H, M}) ->
dec_tzo(Val) ->
[H1, M1] = str:tokens(Val, <<":">>),
- H = erlang:binary_to_integer(H1),
- M = erlang:binary_to_integer(M1),
+ H = jlib:binary_to_integer(H1),
+ M = jlib:binary_to_integer(M1),
if H >= -12, H =< 12, M >= 0, M < 60 -> {H, M} end.
decode_muc({xmlel, <<"x">>, _attrs, _els}) ->
diff --git a/tools/xmpp_codec.spec b/tools/xmpp_codec.spec
index 86cc03088..02e28a1f9 100644
--- a/tools/xmpp_codec.spec
+++ b/tools/xmpp_codec.spec
@@ -1986,8 +1986,8 @@
dec_tzo(Val) ->
[H1, M1] = str:tokens(Val, <<":">>),
- H = erlang:binary_to_integer(H1),
- M = erlang:binary_to_integer(M1),
+ H = jlib:binary_to_integer(H1),
+ M = jlib:binary_to_integer(M1),
if H >= -12, H =< 12, M >= 0, M < 60 ->
{H, M}
end.