diff options
author | Morgan Collett <morgan.collett@gmail.com> | 2007-07-09 13:24:06 (GMT) |
---|---|---|
committer | Morgan Collett <morgan.collett@gmail.com> | 2007-07-09 13:24:06 (GMT) |
commit | 0fdd201b8f383188b5f283313ee30115ef8f1896 (patch) | |
tree | 8c7a964104a58534162cc5ca485a67405372d4c9 /src/server_plugin.py | |
parent | f7c174aa82bbafa6ebdc33930acb9f8aaa37e689 (diff) | |
parent | c9c66a6b53699090f6b863cfa249395ffca653d6 (diff) |
Merge http://people.freedesktop.org/~smcv/git/presence-service
Diffstat (limited to 'src/server_plugin.py')
-rw-r--r-- | src/server_plugin.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/server_plugin.py b/src/server_plugin.py index c589877..7c275b1 100644 --- a/src/server_plugin.py +++ b/src/server_plugin.py @@ -68,12 +68,12 @@ class ServerPlugin(TelepathyPlugin): if address: _logger.debug("::: valid IP4 address, conn_status %s", self._conn_status) - if self._conn_status == CONNECTION_STATUS_DISCONNECTED: - _logger.debug("::: will connect") + # this is a no-op if starting would be inappropriate right now + if self._conn_status != CONNECTION_STATUS_DISCONNECTED: self.start() else: _logger.debug("::: invalid IP4 address, will disconnect") - self.stop() + self._stop() def _get_account_info(self): """Retrieve connection manager parameters for this account @@ -126,7 +126,8 @@ class ServerPlugin(TelepathyPlugin): return None def _could_connect(self): - return bool(self._ip4am.props.address) + return bool(self._ip4am.props.address and + TelepathyPlugin._could_connect(self)) def _server_is_trusted(self, hostname): """Return True if the server with the given hostname is trusted to @@ -240,7 +241,8 @@ class ServerPlugin(TelepathyPlugin): if local_pending: # accept pending subscriptions # FIXME: do this async - publish[CHANNEL_INTERFACE_GROUP].AddMembers(local_pending, '') + self._publish_channel[CHANNEL_INTERFACE_GROUP].AddMembers( + local_pending, '') # request subscriptions from people subscribed to us if we're not # subscribed to them |