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

Update Exmpp XML parser options.

SVN Revision: 1703
This commit is contained in:
Jean-Sébastien Pédron 2008-12-05 15:06:49 +00:00
parent b425093813
commit b82b66fdf0
6 changed files with 14 additions and 12 deletions

View File

@ -1,3 +1,9 @@
2008-12-05 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* 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 <js.pedron@meetic-corp.com>
* src/mod_proxy65/mod_proxy65_stream.erl,

View File

@ -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,

View File

@ -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(

View File

@ -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

View File

@ -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"], []} ->

View File

@ -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