]> granicus.if.org Git - ejabberd/commitdiff
XEP-0198: Use different error message for bounces
authorHolger Weiss <holger@zedat.fu-berlin.de>
Fri, 6 May 2016 12:12:22 +0000 (14:12 +0200)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Fri, 6 May 2016 12:12:22 +0000 (14:12 +0200)
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.

src/ejabberd_c2s.erl

index 10657c45da8f17c687a988379bd1144acbeca4a3..5cfa74bde0f100e54bd0e4b2e07f9769ce4d44ec 100644 (file)
@@ -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);