From: Evgeniy Khramtsov Date: Tue, 28 Feb 2017 13:47:31 +0000 (+0300) Subject: Make sure all hooks are called with proper host in ejabberd_c2s X-Git-Tag: 17.03~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=489385d565113462d44604abd7dd4c38c9306f6d;p=ejabberd Make sure all hooks are called with proper host in ejabberd_c2s --- diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index aca4ac5dc..826a49cd4 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -416,7 +416,7 @@ bind(R, #{user := U, server := S, access := Access, lang := Lang, handle_stream_start(StreamStart, #{lserver := LServer} = State) -> case ejabberd_router:is_my_host(LServer) of false -> - send(State, xmpp:serr_host_unknown()); + send(State#{lserver => ?MYNAME}, xmpp:serr_host_unknown()); true -> change_shaper(State), ejabberd_hooks:run_fold(