From c32cbd90e8d0d24c35c9b16d0fea37e2446043b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Mon, 29 Sep 2008 09:42:05 +0000 Subject: [PATCH] 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 --- ChangeLog | 7 +++++++ src/jlib.erl | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f12ab5cd0..fe63130b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-29 Jean-Sébastien Pédron + + * 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 * src/jlib.erl (timestamp_to_xml): Create an #xmlel element, not an diff --git a/src/jlib.erl b/src/jlib.erl index b64fc3a1b..73fc5fc0f 100644 --- a/src/jlib.erl +++ b/src/jlib.erl @@ -453,7 +453,7 @@ iq_to_xml(#iq{id = ID, type = Type, sub_el = SubEl}) -> 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" -> lists:reverse(parse_xdata_fields(Els, [])); _ -> @@ -472,7 +472,7 @@ parse_xdata_fields([], Res) -> Res; parse_xdata_fields([{xmlel, _, _, 'field', Attrs, SubEls} | Els], 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); Var ->