[telepathy-butterfly/master] Trigger "Name in use" error when another client logged in using the same account

Louis-Francis Ratté-Boulianne louis-francis.ratte-boulianne at collabora.co.uk
Wed Jul 22 11:33:49 PDT 2009


---
 butterfly/connection.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/butterfly/connection.py b/butterfly/connection.py
index b9defd2..4bd644e 100644
--- a/butterfly/connection.py
+++ b/butterfly/connection.py
@@ -258,6 +258,9 @@ class ButterflyConnection(telepathy.server.Connection,
             self.__disconnect_reason = telepathy.CONNECTION_STATUS_REASON_NETWORK_ERROR
         elif type == papyon.event.ClientErrorType.AUTHENTICATION:
             self.__disconnect_reason = telepathy.CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED
+        elif type == papyon.event.ClientErrorType.PROTOCOL and \
+             error == papyon.event.ProtocolError.OTHER_CLIENT:
+            self.__disconnect_reason = telepathy.CONNECTION_STATUS_REASON_NAME_IN_USE
         else:
             self.__disconnect_reason = telepathy.CONNECTION_STATUS_REASON_NONE_SPECIFIED
 
-- 
1.5.6.5



More information about the telepathy-commits mailing list