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:
parent
b425093813
commit
b82b66fdf0
@ -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>
|
2008-12-03 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
||||||
|
|
||||||
* src/mod_proxy65/mod_proxy65_stream.erl,
|
* src/mod_proxy65/mod_proxy65_stream.erl,
|
||||||
|
@ -164,10 +164,8 @@ handle_call(reset_stream, _From,
|
|||||||
?HIBERNATE_TIMEOUT};
|
?HIBERNATE_TIMEOUT};
|
||||||
handle_call({become_controller, C2SPid}, _From, State) ->
|
handle_call({become_controller, C2SPid}, _From, State) ->
|
||||||
Parser = exmpp_xml:start_parser([
|
Parser = exmpp_xml:start_parser([
|
||||||
{namespace, true},
|
names_as_atom,
|
||||||
{name_as_atom, true},
|
{max_size, State#state.max_stanza_size}
|
||||||
{autoload_known, true},
|
|
||||||
{maxsize, State#state.max_stanza_size}
|
|
||||||
]),
|
]),
|
||||||
XMLStreamState = exmpp_xmlstream:start(
|
XMLStreamState = exmpp_xmlstream:start(
|
||||||
{gen_fsm, C2SPid}, Parser,
|
{gen_fsm, C2SPid}, Parser,
|
||||||
|
@ -51,7 +51,7 @@ import_file(File) ->
|
|||||||
{ok, Text} ->
|
{ok, Text} ->
|
||||||
try
|
try
|
||||||
[El] = exmpp_xml:parse_document(Text,
|
[El] = exmpp_xml:parse_document(Text,
|
||||||
[namespace, name_as_atom]),
|
[names_as_atom]),
|
||||||
case catch process_xdb(User, Server, El) of
|
case catch process_xdb(User, Server, El) of
|
||||||
{'EXIT', Reason} ->
|
{'EXIT', Reason} ->
|
||||||
?ERROR_MSG(
|
?ERROR_MSG(
|
||||||
|
@ -251,7 +251,7 @@ pop_offline_messages(Ls, User, Server) ->
|
|||||||
Ls ++ lists:flatmap(
|
Ls ++ lists:flatmap(
|
||||||
fun({_, XML}) ->
|
fun({_, XML}) ->
|
||||||
try
|
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(
|
To = exmpp_jid:list_to_jid(
|
||||||
exmpp_stanza:get_recipient(El)),
|
exmpp_stanza:get_recipient(El)),
|
||||||
From = exmpp_jid:list_to_jid(
|
From = exmpp_jid:list_to_jid(
|
||||||
@ -327,7 +327,7 @@ user_queue(User, Server, Query, Lang) ->
|
|||||||
{selected, ["username", "xml"], Rs} ->
|
{selected, ["username", "xml"], Rs} ->
|
||||||
lists:flatmap(
|
lists:flatmap(
|
||||||
fun({_, XML}) ->
|
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] ->
|
||||||
[El]
|
[El]
|
||||||
catch
|
catch
|
||||||
@ -394,7 +394,7 @@ user_queue_parse_query(Username, LServer, Query) ->
|
|||||||
{selected, ["xml", "seq"], Rs} ->
|
{selected, ["xml", "seq"], Rs} ->
|
||||||
lists:flatmap(
|
lists:flatmap(
|
||||||
fun({XML, Seq}) ->
|
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] ->
|
||||||
[{El, Seq}]
|
[{El, Seq}]
|
||||||
catch
|
catch
|
||||||
|
@ -151,9 +151,7 @@ get_data(LUser, LServer, [El | Els], Res) ->
|
|||||||
LXMLNS = ejabberd_odbc:escape(XMLNS),
|
LXMLNS = ejabberd_odbc:escape(XMLNS),
|
||||||
case catch odbc_queries:get_private_data(LServer, Username, LXMLNS) of
|
case catch odbc_queries:get_private_data(LServer, Username, LXMLNS) of
|
||||||
{selected, ["data"], [{SData}]} ->
|
{selected, ["data"], [{SData}]} ->
|
||||||
[Data] = exmpp_xml:parse_document(SData,[namespace,
|
[Data] = exmpp_xml:parse_document(SData,[names_as_atom]),
|
||||||
name_as_atom,
|
|
||||||
autoload_known]),
|
|
||||||
get_data(LUser, LServer, Els, [Data | Res]);
|
get_data(LUser, LServer, Els, [Data | Res]);
|
||||||
%% MREMOND: I wonder when the query could return a vcard ?
|
%% MREMOND: I wonder when the query could return a vcard ?
|
||||||
{selected, ["vcard"], []} ->
|
{selected, ["vcard"], []} ->
|
||||||
|
@ -134,7 +134,7 @@ process_sm_iq(_From, To, #iq{type = get} = IQ_Rec) ->
|
|||||||
case catch odbc_queries:get_vcard(LServer, Username) of
|
case catch odbc_queries:get_vcard(LServer, Username) of
|
||||||
{selected, ["vcard"], [{SVCARD}]} ->
|
{selected, ["vcard"], [{SVCARD}]} ->
|
||||||
try exmpp_xml:parse_document(SVCARD,
|
try exmpp_xml:parse_document(SVCARD,
|
||||||
[namespace, name_as_atom, autoload_known]) of
|
[names_as_atom]) of
|
||||||
[VCARD] ->
|
[VCARD] ->
|
||||||
exmpp_iq:result(IQ_Rec, VCARD)
|
exmpp_iq:result(IQ_Rec, VCARD)
|
||||||
catch
|
catch
|
||||||
|
Loading…
Reference in New Issue
Block a user