From: Holger Weiss Date: Fri, 6 May 2016 12:12:22 +0000 (+0200) Subject: XEP-0198: Use different error message for bounces X-Git-Tag: 16.06~99 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff4a0e1808ccd116588e987ede21956222031f6d;p=ejabberd XEP-0198: Use different error message for bounces When stanzas are bounced from the stream management queue (because the session timed out or was closed for some other reason), use a different error message so that this situation can be distinguished from other cases. --- diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 10657c45d..5cfa74bde 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -2886,7 +2886,7 @@ handle_unacked_stanzas(StateData) end; false -> fun(From, To, El, _Time) -> - Txt = <<"User session not found">>, + Txt = <<"User session terminated">>, Err = jlib:make_error_reply( El, @@ -2898,7 +2898,7 @@ handle_unacked_stanzas(StateData) ?DEBUG("Dropping presence stanza from ~s", [jid:to_string(From)]); (From, To, #xmlel{name = <<"iq">>} = El, _Time) -> - Txt = <<"User session not found">>, + Txt = <<"User session terminated">>, Err = jlib:make_error_reply( El, ?ERRT_SERVICE_UNAVAILABLE(Lang, Txt)), ejabberd_router:route(To, From, Err);