diff options
author | Morgan Collett <morgan.collett@gmail.com> | 2008-05-22 15:00:18 (GMT) |
---|---|---|
committer | Morgan Collett <morgan.collett@gmail.com> | 2008-05-22 15:00:18 (GMT) |
commit | d960e0126a3748a9486fec5dd166998c1b20a16a (patch) | |
tree | f9bb9e476729574797b254438672cf858aa39172 | |
parent | da68592f9aad9adc05ace6313735bf691d508f6e (diff) | |
parent | 1c71ba79d5101bd306665e41499af7b2dc49782f (diff) |
Merge branch 'master' of git://dev.laptop.org/projects/presence-service
-rw-r--r-- | NEWS | 207 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/activity.py | 39 | ||||
-rw-r--r-- | src/server_plugin.py | 9 | ||||
-rw-r--r-- | src/telepathy_plugin.py | 11 |
5 files changed, 42 insertions, 226 deletions
@@ -1,204 +1,7 @@ -* #6142: Don't update buddy properties without a key (cassidy) +sugar-presence-service 0.81.1 (2008-05-21) +========================================== -Snapshot 76984f3f28 +The "I'm full of Glucose" release. -* #5368: Delay setting a buddy's current activity (morgs) - -Snapshot 5650e153bd - -* #4965: Add SyncFriends method as temporary measure for synchronising friends - list to roster group on Jabber server. - -Snapshot 150051a3a9 - -* #4920: Harden _add_buddies to cope with no handle when calling - BuddyHandleJoined (morgs) -* #4993: Only approve subscriptions coming from a trusted server (cassidy) - -Snapshot 4c8e8b71b5 - -* #4896: Make subscribe/presence channel tracking not dependent on which order - they appear in -* #4920: Make logging more robust in BuddyHandleJoined (morgs) - -Snapshot 128c59c612 - -* #4936: Enable SSL so we can use DEFLATE compression (robot101) -* #4896: Wait for NewChannel with roster channels to avoid timeout leaving - you with no buddies (daf) -* #2522: Use an exponential backoff when trying to reconnect CM (cassidy) -* #4907: Try to reconnect Gabble if initial attempt failed (cassidy) - -Snapshot 89c33bcf93 - -* #4660: Fix regression when sharing an activity (cassidy) - -Snapshot 43d1d48b27 - -* #4692: Don't put activity sharer in 'private' property (correcting a wrong - part of the patch for #4585) (smcv) -* #4660: when calling ShareActivity(), allow private, tags, color to be set - by putting them in the properties dict, which was previously ignored (smcv) - -Snapshot 944c5280b4 - -* #4585: Watch activity unique names on D-Bus for disappearences, implying - the activity crashed; this time, treat that as the local user leaving, - not as the activity disappearing! (smcv) -* #4659: Revert part of #4585 fix (this part didn't make sense anyway) - to fix inability to join activities (smcv) -* #4661: don't break the debug log if names are non-ASCII (smcv) - -Snapshot 0d8c69c14b - -* #4585: Watch activity unique names on D-Bus for disappearances implying - the activity crashed (morgs) - -Snapshot 1effa5a10d - -Snapshot f2411a6161 - -* #2412: improve our ability to cope with disconnections and CM crashes (morgs) - -Snapshot 11d8103108 - -* #4537: actually set registered = True (again) (smcv) - -Snapshot 25577b1486 - -* #4027: associate activity debug messages with the relevant activity (smcv) - -Snapshot 439e31672b - -* Emit BuddyHandleJoined with Buddy and handle so sugar.presence can - track handles without calling PS (morgs) -* Create Tubes Channel during join process (morgs) - -Snapshot 6d79687f8b - -* #3683: don't use (potentially long) user-supplied nickname in mDNS instance - names, this can break Salut activity advertisement (smcv) -* #3422: don't emit spurious CurrentActivityChanged signal when changing from - no current activity to no current activity (smcv) -* #3465: don't keep invite-only activities in the mesh view after we leave - them (smcv) - -Snapshot 6df1f3eca5 - -* #3506: LL and server plugins are mutually exclusive for trial-3 (dcbw) - -Snapshot 46898a3e00 - -* Adapt to sugar API change (marco) - -Snapshot b8d04713ac - -* #3380: de-restrict invitations so non-initiator can invite people to an - activity (only effective if you also have Gabble trial3a 20070912 snapshot) - (smcv) -* #3369: avoid Gabble invite-only activities disappearing from the - mesh view when we join them (smcv) -* #3370: fix error reporting in logs by working around dbus-python bug#12403 - (smcv) - -Snapshot bff163d57b - -* #3328: when we join an activity on Salut, don't stop it from being - the other participants' current activity (smcv) -* #3327: don't let a slower connection manager delete current activity - advertised by a faster one (smcv) -* #2299: Be sure buddies keys are converted to string (cassidy) -* #3291: Further improve activity participant tracking (smcv) -* Correctly pick up existing Salut connections (smcv) -* Don't crash if a buddy property is None (smcv) -* #3290: When a buddy goes offline, consider them to have left all their - activities (smcv) - -Snapshot 3ed091301b - -* Improve tracking of who's in activities with us (smcv) -* Refactor joining/sharing so we don't claim to have succeeded, - or try to SetProperties(), until we're actually in the chatroom - (fixes regression with Salut darcs HEAD) (smcv) - -Snapshot 3b1f4a0c42 - -* #3147: Set _PROP_CURACT to current activity when sharing an activity - or joining (morgs) - -Snapshot a79f7b6488 - -* Fix non-ASCII activity names (smcv) -* Notify local processes when we change an activity name, so the mesh - view can update (smcv) -* Fix bug where activities initially had empty title in mesh view (smcv) - -Snapshot 25218b4642 - -* Support invitations and non-public activities (smcv) -* Support mutable name/tags/color/private properties (smcv) - -Snapshot 1c58a0be88 - -* Update LinkLocal plugin's protocol to "local-xmpp" - -Snapshot 970ca27db7 - -* Make buddy-left async (morgs) - -Snapshot 8dc589f5b0 - -* #2214: Gracefully handle blank server field (dcbw) - -Snapshot fbc25c93ad - -Snapshot bc7fc5f02d - -* Cope with arbitrary Unicode in nicknames, bug#2611 (smcv) - -Snapshot ce62f752b2 - -* Text channel creation minor fixes (smcv) -* #2062: Handle trying to register if the server says already registered - (cassidy) - -Snapshot 79251459e5 - -* Return buddy properties as a byte array, not an array of bytes (dcbw) -* Don't list the owner twice in GetBuddies method (danw) - -Snapshot 650c323462 - -* Don't send None over D-Bus when updating current activity (danw) -* Make locally-originated shared activities disappear when everyone leaves (dcbw) - -Snapshot 6c86d827b5 - -* Set Buddy current-activity property to none if leaving the current activity -* Hook up to owner current activity change signal so current activity changes - get propagated -* Fix re-appearance of buddies by actually forgetting about the buddy completely - when a buddy disappears - -Snapshot b539f146e9 - -* Disable avatars. The cache was causing high cpu usage at startup (smcv) - -Snapshot e9c851eb8f - -* Reapply (with fix) the patch for Better backoffs with connection - retries to avoid hogging the CPU (morgs) - -Snapshot 6f2584d5eb - -* Revert: Better backoffs with connection retries... as it stopped - the server plugin from connecting (morgs) - -Snapshot e26e3c0294 - -* Better backoffs with connection retries to avoid hogging the CPU (smcv) -* Cope with CMs with no presence interface (smcv) -* Warn if dbus-python is older than 0.82.0 (smcv) -* Implement PS calls to leave a shared activity (morgs) -* Fix buddy-left signals (morgs) -* Fixed regressions from adding salut (smcv, morgs) +- No code change since 0.79.3, the point of this release is to sync +version number with Sucrose. diff --git a/configure.ac b/configure.ac index ecd354f..40aa7a9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([Sugar Presence Service],[0.79.1],[],[sugar-presence-service]) +AC_INIT([Sugar Presence Service],[0.81.1],[],[sugar-presence-service]) AC_PREREQ([2.59]) diff --git a/src/activity.py b/src/activity.py index 1401699..ec20536 100644 --- a/src/activity.py +++ b/src/activity.py @@ -793,14 +793,15 @@ class Activity(ExportedGObject): self._join_cb() _logger.debug("%s of activity %r succeeded", verb, self) except Exception, e: - self._join_failed_cb(e) + self._join_failed_cb(e, 'Activity._joined_cb') self._join_cb = None self._join_err_cb = None - def _join_failed_cb(self, e): + def _join_failed_cb(self, e, location='unknown'): verb = self._join_is_sharing and 'Share' or 'Join' - _logger.debug("%s of activity %r failed: %s", verb, self, e) + _logger.debug("%s of activity %r failed: %s in %s", + verb, self, e, location) throw_into_callback(self._join_err_cb, e) self._join_cb = None @@ -830,7 +831,8 @@ class Activity(ExportedGObject): if props_to_set: self._text_channel[PROPERTIES_INTERFACE].SetProperties( props_to_set, reply_handler=self._joined_cb, - error_handler=self._join_failed_cb) + error_handler=lambda e: self._join_failed_cb(e, + 'Activity._join_activity_channel_props_listed_cb')) else: self._joined_cb() @@ -869,13 +871,15 @@ class Activity(ExportedGObject): _logger.debug('%r: I am local pending - entering room', self) group.AddMembers([self_ident[0]], '', reply_handler=lambda: None, - error_handler=self._join_failed_cb) + error_handler=lambda e: self._join_failed_cb(e, + 'got_all_members AddMembers')) elif self._self_handle in local_pending: _logger.debug('%r: I am local pending with channel-specific ' 'handle - entering room', self) group.AddMembers([self._self_handle], '', reply_handler=lambda: None, - error_handler=self._join_failed_cb) + error_handler=lambda e: self._join_failed_cb(e, + 'got_all_members AddMembers cs handle')) elif self._self_handle in members: _logger.debug('%r: I am already in the room', self) assert self._joined # set by _text_channel_members_changed_cb @@ -890,7 +894,8 @@ class Activity(ExportedGObject): # bootstrap by getting the current state. This is where we find # out whether anyone was lying to us in their PEP info group.GetAllMembers(reply_handler=got_all_members, - error_handler=self._join_failed_cb) + error_handler=lambda e: \ + self._join_failed_cb(e, 'got_group_flags')) def got_self_handle(self_handle): self._self_handle = self_handle @@ -900,10 +905,14 @@ class Activity(ExportedGObject): self._text_channel_matches.append(m) group.GetGroupFlags(reply_handler=got_group_flags, - error_handler=self._join_failed_cb) + error_handler=lambda e: \ + self._join_failed_cb(e, + 'got_self_handle GetGroupFlags')) group.GetSelfHandle(reply_handler=got_self_handle, - error_handler=self._join_failed_cb) + error_handler=lambda e: \ + self._join_failed_cb(e, + 'GetSelfHandle')) def _join_activity_create_channel_cb(self, text_chan_path): @@ -913,7 +922,8 @@ class Activity(ExportedGObject): reply_handler=lambda tubes_chan_path: \ self._join_activity_create_tubes_cb( text_chan_path, tubes_chan_path), - error_handler=self._join_failed_cb) + error_handler=lambda e: self._join_failed_cb(e, + 'Activity._join_activity_create_channel_cb')) def _join_activity_got_handles_cb(self, handles): assert len(handles) == 1 @@ -924,7 +934,8 @@ class Activity(ExportedGObject): conn[CONN_INTERFACE].RequestChannel(CHANNEL_TYPE_TEXT, HANDLE_TYPE_ROOM, self._room, True, reply_handler=self._join_activity_create_channel_cb, - error_handler=self._join_failed_cb) + error_handler=lambda e: self._join_failed_cb(e, + 'Activity._join_activity_got_handles_cb')) def join(self, async_cb, async_err_cb, sharing, private=None, sender=None): @@ -978,7 +989,8 @@ class Activity(ExportedGObject): conn[CONN_INTERFACE].RequestHandles(HANDLE_TYPE_ROOM, [self._tp.suggest_room_for_activity(self._id)], reply_handler=self._join_activity_got_handles_cb, - error_handler=self._join_failed_cb) + error_handler=lambda e: self._join_failed_cb(e, + 'Activity.join RequestHandles')) else: _logger.warning("Raising RuntimeError: Don't know room for %r", self) @@ -1132,7 +1144,8 @@ class Activity(ExportedGObject): else: self._text_channel[PROPERTIES_INTERFACE].ListProperties( reply_handler=self._join_activity_channel_props_listed_cb, - error_handler=self._join_failed_cb) + error_handler=lambda e: self._join_failed_cb(e, + 'Activity._text_channel_members_changed_cb')) def _text_channel_closed_cb(self): """Callback method called when the text channel is closed. diff --git a/src/server_plugin.py b/src/server_plugin.py index f862ce4..c81a936 100644 --- a/src/server_plugin.py +++ b/src/server_plugin.py @@ -374,14 +374,7 @@ class ServerPlugin(TelepathyPlugin): friends_handles = set() friends = set() for key in keys: - try: - decoded = base64.b64decode(key) - except TypeError: - # key is invalid; skip this friend - _logger.debug('skipping friend with invalid key') - continue - - id = psutils.pubkey_to_keyid(decoded) + id = psutils.pubkey_to_keyid(key) # this assumes that all our friends are on the same server as us jid = '%s@%s' % (id, profile.jabber_server) friends.add(jid) diff --git a/src/telepathy_plugin.py b/src/telepathy_plugin.py index b4581d8..c85bdd1 100644 --- a/src/telepathy_plugin.py +++ b/src/telepathy_plugin.py @@ -179,6 +179,7 @@ class TelepathyPlugin(gobject.GObject): """Attempt to reconnect to the server after the back-off time has elapsed. """ + _logger.debug("%r: reconnect timed out. Let's try to connect", self) if self._backoff_id > 0: gobject.source_remove(self._backoff_id) self._backoff_id = 0 @@ -192,6 +193,8 @@ class TelepathyPlugin(gobject.GObject): if self._backoff_id != 0: gobject.source_remove(self._backoff_id) + _logger.debug("%r: restart reconnect time out (%u seconds)", + self, self._reconnect_timeout / 1000) self._backoff_id = gobject.timeout_add(self._reconnect_timeout, self._reconnect_cb) @@ -209,9 +212,13 @@ class TelepathyPlugin(gobject.GObject): if there is an existing connection, reuse it by registering for various of events on it. """ + _logger.debug('%r: init connection', self) conn = self._find_existing_connection() if not conn: + _logger.debug('%r: no existing connection. Create a new one', self) conn = self._make_new_connection() + else: + _logger.debug('%r: found existing connection. Reuse it', self) m = conn[CONN_INTERFACE].connect_to_signal('StatusChanged', self._handle_connection_status_change) @@ -286,14 +293,14 @@ class TelepathyPlugin(gobject.GObject): _logger.debug("%r: disconnected (reason %r)", self, reason) if reason == CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED: # FIXME: handle connection failure; retry later? + _logger.debug("%r: authentification failed. Give up ", self) pass else: # Try again later. We'll detect whether we have a network # connection after the retry period elapses. The fact that # this timer is running also serves as a marker to indicate # that we shouldn't try to go back online yet. - if self._backoff_id: - self._reset_reconnect_timer() + self._reset_reconnect_timer() self.emit('status', self._conn_status, int(reason)) |