]> granicus.if.org Git - ejabberd/commitdiff
Make sure all hooks are called with proper host in ejabberd_c2s
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Tue, 28 Feb 2017 13:47:31 +0000 (16:47 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Tue, 28 Feb 2017 13:47:31 +0000 (16:47 +0300)
src/ejabberd_c2s.erl

index aca4ac5dc2709108f378f57f0ee0a20d46a383c0..826a49cd4deacc0f247ebb28314d899b5c10da9b 100644 (file)
@@ -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(