25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Fix a bug in parse_xdata_submit/1 and parse_xdata_fields/2 where

exmpp_xml:get_attribute_from_list/3 was called with only 2 arguments;
this code has not been updated when exmpp_xml's API changed...

SVN Revision: 1577
This commit is contained in:
Jean-Sébastien Pédron 2008-09-29 09:42:05 +00:00
parent c068d20588
commit c32cbd90e8
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2008-09-29 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* src/jlib.erl (parse_xdata_submit, parse_xdata_fields): Fix a bug
where exmpp_xml:get_attribute_from_list/3 was called with only 2
arguments; this code has not been updated when exmpp_xml's API
changed...
2008-09-25 Jean-Sébastien Pédron <js.pedron@meetic-corp.com> 2008-09-25 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* src/jlib.erl (timestamp_to_xml): Create an #xmlel element, not an * src/jlib.erl (timestamp_to_xml): Create an #xmlel element, not an

View File

@ -453,7 +453,7 @@ iq_to_xml(#iq{id = ID, type = Type, sub_el = SubEl}) ->
parse_xdata_submit({xmlel, _, _, _, Attrs, Els}) -> parse_xdata_submit({xmlel, _, _, _, Attrs, Els}) ->
case exmpp_xml:get_attribute_from_list(Attrs, 'type') of case exmpp_xml:get_attribute_from_list(Attrs, 'type', "") of
"submit" -> "submit" ->
lists:reverse(parse_xdata_fields(Els, [])); lists:reverse(parse_xdata_fields(Els, []));
_ -> _ ->
@ -472,7 +472,7 @@ parse_xdata_fields([], Res) ->
Res; Res;
parse_xdata_fields([{xmlel, _, _, 'field', Attrs, SubEls} | Els], parse_xdata_fields([{xmlel, _, _, 'field', Attrs, SubEls} | Els],
Res) -> Res) ->
case exmpp_xml:get_attribute_from_list(Attrs, 'var') of case exmpp_xml:get_attribute_from_list(Attrs, 'var', "") of
"" -> "" ->
parse_xdata_fields(Els, Res); parse_xdata_fields(Els, Res);
Var -> Var ->