diff --git a/ChangeLog b/ChangeLog index bb2f27900..3c7fd187a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-05 Jean-Sébastien Pédron + + * src/ejabberd_receiver.erl, src/mod_offline_odbc.erl, + src/mod_vcard_odbc.erl, src/mod_private_odbc.erl, src/jd2ejd.erl: + Update Exmpp XML parser options. + 2008-12-03 Jean-Sébastien Pédron * src/mod_proxy65/mod_proxy65_stream.erl, diff --git a/src/ejabberd_receiver.erl b/src/ejabberd_receiver.erl index 37cf38b98..e6d56734c 100644 --- a/src/ejabberd_receiver.erl +++ b/src/ejabberd_receiver.erl @@ -164,10 +164,8 @@ handle_call(reset_stream, _From, ?HIBERNATE_TIMEOUT}; handle_call({become_controller, C2SPid}, _From, State) -> Parser = exmpp_xml:start_parser([ - {namespace, true}, - {name_as_atom, true}, - {autoload_known, true}, - {maxsize, State#state.max_stanza_size} + names_as_atom, + {max_size, State#state.max_stanza_size} ]), XMLStreamState = exmpp_xmlstream:start( {gen_fsm, C2SPid}, Parser, diff --git a/src/jd2ejd.erl b/src/jd2ejd.erl index c5c4a3d8b..67d489c81 100644 --- a/src/jd2ejd.erl +++ b/src/jd2ejd.erl @@ -51,7 +51,7 @@ import_file(File) -> {ok, Text} -> try [El] = exmpp_xml:parse_document(Text, - [namespace, name_as_atom]), + [names_as_atom]), case catch process_xdb(User, Server, El) of {'EXIT', Reason} -> ?ERROR_MSG( diff --git a/src/mod_offline_odbc.erl b/src/mod_offline_odbc.erl index a5db7a9c5..bb54951d2 100644 --- a/src/mod_offline_odbc.erl +++ b/src/mod_offline_odbc.erl @@ -251,7 +251,7 @@ pop_offline_messages(Ls, User, Server) -> Ls ++ lists:flatmap( fun({_, XML}) -> try - [El] = exmpp_xml:parse_document(XML, [namespace, name_as_atom, autoload_known]), + [El] = exmpp_xml:parse_document(XML, [names_as_atom]), To = exmpp_jid:list_to_jid( exmpp_stanza:get_recipient(El)), From = exmpp_jid:list_to_jid( @@ -327,7 +327,7 @@ user_queue(User, Server, Query, Lang) -> {selected, ["username", "xml"], Rs} -> lists:flatmap( fun({_, XML}) -> - try exmpp_xml:parse_document(XML, [namespace, name_as_atom, autoload_known]) of + try exmpp_xml:parse_document(XML, [names_as_atom]) of [El] -> [El] catch @@ -394,7 +394,7 @@ user_queue_parse_query(Username, LServer, Query) -> {selected, ["xml", "seq"], Rs} -> lists:flatmap( fun({XML, Seq}) -> - try exmpp_xml:parse_document(XML, [namespace, name_as_atom, autoload_known]) of + try exmpp_xml:parse_document(XML, [names_as_atom]) of [El] -> [{El, Seq}] catch diff --git a/src/mod_private_odbc.erl b/src/mod_private_odbc.erl index 09dce943d..94e4b6eeb 100644 --- a/src/mod_private_odbc.erl +++ b/src/mod_private_odbc.erl @@ -151,9 +151,7 @@ get_data(LUser, LServer, [El | Els], Res) -> LXMLNS = ejabberd_odbc:escape(XMLNS), case catch odbc_queries:get_private_data(LServer, Username, LXMLNS) of {selected, ["data"], [{SData}]} -> - [Data] = exmpp_xml:parse_document(SData,[namespace, - name_as_atom, - autoload_known]), + [Data] = exmpp_xml:parse_document(SData,[names_as_atom]), get_data(LUser, LServer, Els, [Data | Res]); %% MREMOND: I wonder when the query could return a vcard ? {selected, ["vcard"], []} -> diff --git a/src/mod_vcard_odbc.erl b/src/mod_vcard_odbc.erl index db0b1fd9b..dd1a59adb 100644 --- a/src/mod_vcard_odbc.erl +++ b/src/mod_vcard_odbc.erl @@ -134,7 +134,7 @@ process_sm_iq(_From, To, #iq{type = get} = IQ_Rec) -> case catch odbc_queries:get_vcard(LServer, Username) of {selected, ["vcard"], [{SVCARD}]} -> try exmpp_xml:parse_document(SVCARD, - [namespace, name_as_atom, autoload_known]) of + [names_as_atom]) of [VCARD] -> exmpp_iq:result(IQ_Rec, VCARD) catch