diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2014-07-05 17:53:45 +0400 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2014-07-05 17:53:45 +0400 |
commit | 76ebebf2a084375043da1bcf46c7998c944a0320 (patch) | |
tree | 04425083e5e242a3be7293400e9c8bcbadac2c38 /src | |
parent | Return MySQL error messages as binary. (diff) |
Revert "Fix IQ XML generation."
This reverts commit 26a4d91297a7d7400dbdd30a063e163afa83fb22.
Diffstat (limited to 'src')
-rw-r--r-- | src/jlib.erl | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/jlib.erl b/src/jlib.erl index 549c9b71b..7735d7dbc 100644 --- a/src/jlib.erl +++ b/src/jlib.erl @@ -451,23 +451,15 @@ iq_type_to_string(error) -> <<"error">>. ). iq_to_xml(#iq{id = ID, type = Type, sub_el = SubEl}) -> - Children = case Type of - set -> - [SubEl]; - get -> - [SubEl]; - _ -> - SubEl - end, if ID /= <<"">> -> #xmlel{name = <<"iq">>, attrs = [{<<"id">>, ID}, {<<"type">>, iq_type_to_string(Type)}], - children = Children}; + children = SubEl}; true -> #xmlel{name = <<"iq">>, attrs = [{<<"type">>, iq_type_to_string(Type)}], - children = Children} + children = SubEl} end. -spec(parse_xdata_submit/1 :: @@ -808,7 +800,7 @@ base64_to_term(Base64) -> decode_base64(S) -> decode_base64_bin(S, <<>>). -take_without_spaces(Bin, Count) -> +take_without_spaces(Bin, Count) -> take_without_spaces(Bin, Count, <<>>). take_without_spaces(Bin, 0, Acc) -> |