mirror of
https://github.com/processone/ejabberd.git
synced 2024-10-13 15:16:49 +02:00
Replace concat_binary supported until R14 with list_to_binary supported since R9
This commit is contained in:
parent
f36ac2b809
commit
6bde01cd45
@ -118,7 +118,7 @@ dec_attrs(<<>>, Msg) ->
|
||||
Msg.
|
||||
|
||||
enc_attrs(Msg) ->
|
||||
concat_binary(
|
||||
list_to_binary(
|
||||
[enc_attr(?STUN_ATTR_SOFTWARE, Msg#stun.'SOFTWARE'),
|
||||
enc_addr(?STUN_ATTR_MAPPED_ADDRESS, Msg#stun.'MAPPED-ADDRESS'),
|
||||
enc_xor_addr(?STUN_ATTR_XOR_MAPPED_ADDRESS,
|
||||
@ -230,7 +230,7 @@ enc_unknown_attrs([]) ->
|
||||
<<>>;
|
||||
enc_unknown_attrs(Attrs) ->
|
||||
enc_attr(?STUN_ATTR_UNKNOWN_ATTRIBUTES,
|
||||
concat_binary([<<Attr:16>> || Attr <- Attrs])).
|
||||
list_to_binary([<<Attr:16>> || Attr <- Attrs])).
|
||||
|
||||
%%====================================================================
|
||||
%% Auxiliary functions
|
||||
|
@ -99,12 +99,12 @@ make_text_node(CData) ->
|
||||
cdata ->
|
||||
CDATA1 = <<"<![CDATA[">>,
|
||||
CDATA2 = <<"]]>">>,
|
||||
concat_binary([CDATA1, CData, CDATA2]);
|
||||
list_to_binary([CDATA1, CData, CDATA2]);
|
||||
none ->
|
||||
CData;
|
||||
{cdata, EndTokens} ->
|
||||
EscapedCData = escape_cdata(CData, EndTokens),
|
||||
concat_binary(EscapedCData)
|
||||
list_to_binary(EscapedCData)
|
||||
end.
|
||||
|
||||
%% Returns escape type needed for the text node
|
||||
|
@ -83,7 +83,7 @@ process_data(CallbackPid, Stack, Data) ->
|
||||
[{xmlelement, Name, Attrs,
|
||||
[{xmlcdata, PreviousCData}|Els]} | Tail] ->
|
||||
[{xmlelement, Name, Attrs,
|
||||
[{xmlcdata, concat_binary([PreviousCData, CData])} | Els]} | Tail];
|
||||
[{xmlcdata, list_to_binary([PreviousCData, CData])} | Els]} | Tail];
|
||||
%% No previous CDATA
|
||||
[{xmlelement, Name, Attrs, Els} | Tail] ->
|
||||
[{xmlelement, Name, Attrs, [{xmlcdata, CData} | Els]} |
|
||||
|
Loading…
Reference in New Issue
Block a user