[Dextrose] [sugar PATCH v2] sl#3326: Do not allow two telepathy-coonection objects to be instantiated, for a single Telepathy-Gabble-Account.
ajay at activitycentral.com
Sat Jul 28 06:08:20 EDT 2012
Thanks to Jerry Vonau, for inspiring and guiding me to solve this :-)
Thanks to Daniel Drake, for the review of version-1 patch.
Changes of version-2 over version-1 :
Version-1 attached callback signals to only one of the two telepathy-connection-objects,
instantiated per telepathy-gabble-account. However, two telepathy-connection-objects
were instantiated nevertheless. So, we needed to ensure that only one telepathy-connection-object
per telepathy-gabble-account be created (Thanks Daniel again).
Note that ::
In the method "def __account_property_changed_cb(self, properties)", the properties were
investigated in each hit of this function. Unfortunately, in each call,
properties['ConnectionStatus'] = 1
properties['ConnectionStatus'] = 2
which correspond to "Connecting" and "Disconnected" states, respectively.
At no time, was the value
properties['ConnectionStatus'] = 0
which would have corresponded to "Connected" state.
Please see :: http://telepathy.freedesktop.org/spec/Connection.html#Enum:Connection_Status
For every hit of the function "def __account_property_changed_cb(self, properties)", the value of
was either "/", or one other connection-string, WHICH REMAINED CONSTANT IN EVERY CALL (i.e. whenever
the value was not "/").
So, simply ensuring that there would be just one telepathy-connection-object per telepathy-connection-path
(the OTHER value besides "/" in step b)), we would be done.
src/jarabe/model/neighborhood.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py
index 39f648e..430023c 100644
@@ -249,7 +249,6 @@ class _Account(gobject.GObject):
if properties['Connection'] == '/':
- self._connection = None
elif self._connection is None:
More information about the Dextrose