Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2008-02-07 12:02:39 (GMT)
committer Morgan Collett <morgan.collett@gmail.com>2008-02-12 14:21:46 (GMT)
commitbef5474bfe3572e0dec143d3248554ae5ff83c33 (patch)
treeef9f239905ce5e617a18d1bafe0274c7b55bb808
parentcd830a4602b4dfe4e4a63c19b84174e60575446f (diff)
set register param to False if connection failed because of a not authentication problem
-rw-r--r--src/server_plugin.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/server_plugin.py b/src/server_plugin.py
index 35e45bc..a80ba9c 100644
--- a/src/server_plugin.py
+++ b/src/server_plugin.py
@@ -310,14 +310,16 @@ class ServerPlugin(TelepathyPlugin):
if status == self._conn_status:
return
- if (status == CONNECTION_STATUS_DISCONNECTED and
- reason == CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED and
- not self._account['register']):
- _logger.debug('Authentication failed. Trying to register the account')
- self._account['register'] = True
- self._stop()
- self._init_connection()
- return
+ if status == CONNECTION_STATUS_DISCONNECTED:
+ if reason == CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED and \
+ not self._account['register']:
+ _logger.debug('Authentication failed. Trying to register the account')
+ self._account['register'] = True
+ self._stop()
+ self._init_connection()
+ return
+ else:
+ self._account['register'] = False
TelepathyPlugin._handle_connection_status_change(self, status, reason)