mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Accept new #xmlel in functions that create #iq. A warning is printed
when these functions are called with an old #xmlelement. SVN Revision: 1403
This commit is contained in:
parent
d6e6432a46
commit
a25609f66b
@ -33,6 +33,10 @@
|
|||||||
|
|
||||||
* src/ejabberd_local.erl: Convert to exmpp.
|
* src/ejabberd_local.erl: Convert to exmpp.
|
||||||
|
|
||||||
|
* src/jlib.erl: Accept new #xmlel in functions that create #iq. A
|
||||||
|
warning is printed when these functions are called with an old
|
||||||
|
#xmlelement.
|
||||||
|
|
||||||
2008-06-30 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
2008-06-30 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
||||||
|
|
||||||
* src/Makefile.in: Remove the -I flag for exmpp includes; the
|
* src/Makefile.in: Remove the -I flag for exmpp includes; the
|
||||||
|
14
src/jlib.erl
14
src/jlib.erl
@ -360,7 +360,17 @@ iq_query_info(El) ->
|
|||||||
iq_query_or_response_info(El) ->
|
iq_query_or_response_info(El) ->
|
||||||
iq_info_internal(El, any).
|
iq_info_internal(El, any).
|
||||||
|
|
||||||
iq_info_internal({xmlelement, Name, Attrs, Els}, Filter) when Name == "iq" ->
|
iq_info_internal({xmlel, NS, _, _, _, _} = El, Filter) ->
|
||||||
|
ElOld = exmpp_xml:xmlel_to_xmlelement(El, [NS],
|
||||||
|
[{'http://etherx.jabber.org/streams', "stream"}]),
|
||||||
|
iq_info_internal2(ElOld, Filter);
|
||||||
|
iq_info_internal(El, Filter) ->
|
||||||
|
catch throw(for_stacktrace),
|
||||||
|
io:format("~nJLIB: old #xmlelement:~n~p~n~p~n~n",
|
||||||
|
[El, erlang:get_stacktrace()]),
|
||||||
|
iq_info_internal2(El, Filter).
|
||||||
|
|
||||||
|
iq_info_internal2({xmlelement, Name, Attrs, Els}, Filter) when Name == "iq" ->
|
||||||
%% Filter is either request or any. If it is request, any replies
|
%% Filter is either request or any. If it is request, any replies
|
||||||
%% are converted to the atom reply.
|
%% are converted to the atom reply.
|
||||||
ID = xml:get_attr_s("id", Attrs),
|
ID = xml:get_attr_s("id", Attrs),
|
||||||
@ -413,7 +423,7 @@ iq_info_internal({xmlelement, Name, Attrs, Els}, Filter) when Name == "iq" ->
|
|||||||
Class == reply, Filter /= any ->
|
Class == reply, Filter /= any ->
|
||||||
reply
|
reply
|
||||||
end;
|
end;
|
||||||
iq_info_internal(_, _) ->
|
iq_info_internal2(_, _) ->
|
||||||
not_iq.
|
not_iq.
|
||||||
|
|
||||||
is_iq_request_type(set) -> true;
|
is_iq_request_type(set) -> true;
|
||||||
|
Loading…
Reference in New Issue
Block a user