From 16f08734889fc7b0643e1042b1c8771ff139c974 Mon Sep 17 00:00:00 2001 From: Badlop Date: Sat, 16 Oct 2010 22:46:00 +0200 Subject: [PATCH] Fix bug when routing error stanza --- src/ejabberd_c2s.erl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index f2372cbe8..40c5a515f 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -510,9 +510,10 @@ wait_for_auth({xmlstreamelement, El}, StateData) -> exmpp_server_legacy_auth:fields(El, Fields)), fsm_next_state(wait_for_auth, StateData); {auth, _ID, set, {_U, _P, _D, undefined}} -> - Err = exmpp_stanza:error(El#xmlel.ns, 'not-acceptable', - {"en", "No resource provided"}), - send_element(StateData, exmpp_iq:error(El, Err)), + Err = exmpp_stanza:reply_with_error(El, + exmpp_stanza:error(El#xmlel.ns, 'not-acceptable', + {"en", "No resource provided"})), + send_element(StateData, Err), fsm_next_state(wait_for_auth, StateData); {auth, _ID, set, {U, P, D, R}} -> try