25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

Fix decompressing of custom elements with custom namespace

This commit is contained in:
Paweł Chmielowski 2019-01-07 16:08:58 +01:00
parent 9631baaa63
commit 06d69c5277
2 changed files with 4 additions and 4 deletions

View File

@ -506,8 +506,8 @@ decode_child(<<2:8, Rest/binary>>, PNs, J1, J2) ->
{Children, Rest4} = decode_children(Rest3, PNs, J1, J2),
{{xmlel, Name, Attrs, Children}, Rest4};
decode_child(<<3:8, Rest/binary>>, PNs, J1, J2) ->
{Name, Rest2} = decode_string(Rest),
{Ns, Rest3} = decode_string(Rest2),
{Ns, Rest2} = decode_string(Rest),
{Name, Rest3} = decode_string(Rest2),
{Attrs, Rest4} = decode_attrs(Rest3),
{Children, Rest5} = decode_children(Rest4, Ns, J1, J2),
{{xmlel, Name, add_ns(PNs, Ns, Attrs), Children}, Rest5};

View File

@ -117,8 +117,8 @@ gen_decode(Dev, Data, VerId) ->
" {Children, Rest4} = decode_children(Rest3, PNs, J1, J2),~n"
" {{xmlel, Name, Attrs, Children}, Rest4};~n", []),
io:format(Dev, "decode_child(<<3:8, Rest/binary>>, PNs, J1, J2) ->~n"
" {Name, Rest2} = decode_string(Rest),~n"
" {Ns, Rest3} = decode_string(Rest2),~n"
" {Ns, Rest2} = decode_string(Rest),~n"
" {Name, Rest3} = decode_string(Rest2),~n"
" {Attrs, Rest4} = decode_attrs(Rest3),~n"
" {Children, Rest5} = decode_children(Rest4, Ns, J1, J2),~n"
" {{xmlel, Name, add_ns(PNs, Ns, Attrs), Children}, Rest5};~n", []),