diff --git a/src/stun/stun_codec.erl b/src/stun/stun_codec.erl index edad3a2da..ef36c9038 100644 --- a/src/stun/stun_codec.erl +++ b/src/stun/stun_codec.erl @@ -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 <- Attrs])). + list_to_binary([<> || Attr <- Attrs])). %%==================================================================== %% Auxiliary functions diff --git a/src/xml.erl b/src/xml.erl index b33516d83..96d0b2189 100644 --- a/src/xml.erl +++ b/src/xml.erl @@ -99,12 +99,12 @@ make_text_node(CData) -> cdata -> CDATA1 = <<">, 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 diff --git a/src/xml_stream.erl b/src/xml_stream.erl index 36a80fafb..e97a61476 100644 --- a/src/xml_stream.erl +++ b/src/xml_stream.erl @@ -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]} |