From d5aa4be7e5dddce190d667f694b8872c11caab33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Wed, 9 Jul 2008 09:14:19 +0000 Subject: [PATCH] Convert #xmlelement returned by the 'c2s_stream_features' hook to #xmlel. SVN Revision: 1421 --- ChangeLog | 5 +++++ src/ejabberd_c2s.erl | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5c7a7d30e..726641487 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-09 Jean-Sébastien Pédron + + * src/ejabberd_c2s.erl: Convert #xmlelement returned by the + 'c2s_stream_features' hook to #xmlel. + 2008-07-08 Jean-Sébastien Pédron * src/cyrsasl.erl, src/cyrsasl_anonymous.erl, src/cyrsasl_digest.erl, diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 0b3360947..9ecd3ebf5 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -273,15 +273,18 @@ wait_for_stream({xmlstreamstart, #xmlel{ns = NS} = Opening}, StateData) -> false -> [] end, + % XXX OLD FORMAT: Other_Feats. + Other_FeatsOld = ejabberd_hooks:run_fold( + c2s_stream_features, + Server, + [], []), + Other_Feats = [exmpp_xml:xmlelement_to_xmlel(F, [?DEFAULT_NS], ?PREFIXED_NS) || F <- Other_FeatsOld], send_element(StateData, exmpp_stream:features( TLSFeature ++ CompressFeature ++ SASL_Mechs ++ - ejabberd_hooks:run_fold( - c2s_stream_features, - Server, - [], []))), + Other_Feats)), fsm_next_state(wait_for_feature_request, StateData#state{ server = Server,