diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2008-02-07 12:02:39 (GMT) |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2008-02-07 12:02:39 (GMT) |
commit | 39569bc26b2aadbc437e7593b51dc649616072ed (patch) | |
tree | 9c0c5021bae5dc3b1e3b5b2e832fbe33d40befe2 | |
parent | ed5ce20741998bb365360c2afda149e4e061aad1 (diff) |
set register param to False if connection failed because of a not authentication problem
-rw-r--r-- | src/server_plugin.py | 18 |
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) |