]> granicus.if.org Git - ejabberd/commitdiff
* src/ejabberd_c2s.erl: Send stream error when connection is
authorAlexey Shchepin <alexey@process-one.net>
Tue, 22 Nov 2005 18:00:56 +0000 (18:00 +0000)
committerAlexey Shchepin <alexey@process-one.net>
Tue, 22 Nov 2005 18:00:56 +0000 (18:00 +0000)
replaced (thanks to Maxim Ryazanov)

SVN Revision: 440

ChangeLog
src/ejabberd_c2s.erl

index 8782673f8b55dcaad6fb239ef93e9b12cfaf89a5..ff3363fba78c4243f1a2da8c08e9f3e1977fe124 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,12 @@
+2005-11-22  Alexey Shchepin  <alexey@sevcom.net>
+
+       * src/ejabberd_c2s.erl: Send stream error when connection is
+       replaced (thanks to Maxim Ryazanov)
+
 2005-11-19  Mickael Remond  <mickael.remond@process-one.net>
 
-       * contrib/extract_translations/prepare-translation.sh: Added wrapper to
-       extract_translation.erl (thanks to Badlod).
+       * contrib/extract_translations/prepare-translation.sh: Added
+       wrapper to extract_translation.erl (thanks to Badlop)
 
 2005-11-19  Alexey Shchepin  <alexey@sevcom.net>
 
index abc0cf670613501d0d93f6af8fc9e94dfca7aeb1..64ac65d810df0c285ed26952e97b1d39c7f5e747 100644 (file)
@@ -832,8 +832,11 @@ handle_info({send_text, Text}, StateName, StateData) ->
     send_text(StateData, Text),
     {next_state, StateName, StateData};
 handle_info(replaced, _StateName, StateData) ->
-    % TODO
-    %send_text(StateData#state.sender, Text),
+    Lang = StateData#state.lang,
+    send_text(StateData,
+             xml:element_to_string(
+               ?SERRT_CONFLICT(Lang, "Replaced by new connection"))
+             ++ ?STREAM_TRAILER),
     {stop, normal, StateData#state{authenticated = replaced}};
 handle_info({route, From, To, Packet}, StateName, StateData) ->
     {xmlelement, Name, Attrs, Els} = Packet,