From 16a97ab9038e98b14b03227656a1329be564ec26 Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 11 Jan 2011 16:22:22 +0100 Subject: [PATCH] Handle Tigase's unexpected version=1.0 when ejabberd doesn't announce it (EJAB-1379) --- src/ejabberd_s2s_out.erl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ejabberd_s2s_out.erl b/src/ejabberd_s2s_out.erl index 14791eb1f..31eddac6b 100644 --- a/src/ejabberd_s2s_out.erl +++ b/src/ejabberd_s2s_out.erl @@ -333,6 +333,10 @@ wait_for_stream({xmlstreamstart, Opening}, StateData) -> {?NS_JABBER_SERVER, true, true} when StateData#state.use_v10 -> {next_state, wait_for_features, StateData, ?FSMTIMEOUT}; + %% Clause added to handle Tigase's workaround for an old ejabberd bug: + {?NS_JABBER_SERVER, true, true} when + not StateData#state.use_v10 -> + send_db_request(StateData); {?NS_JABBER_SERVER, false, true} when StateData#state.use_v10 -> {next_state, wait_for_features, StateData#state{db_enabled = false}, ?FSMTIMEOUT}; {NSProvided, DB, _} ->