[next] telepathy-glib: TpConnection: ignore self-handle changes that aren' t really changes
Simon McVittie
smcv at kemper.freedesktop.org
Mon Oct 8 08:23:45 PDT 2012
Module: telepathy-glib
Branch: next
Commit: 23d6ac5c8749d622b4fec08ad24960f6c70c48ad
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=23d6ac5c8749d622b4fec08ad24960f6c70c48ad
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Mon Oct 8 14:31:15 2012 +0100
TpConnection: ignore self-handle changes that aren't really changes
---
telepathy-glib/connection.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index 83f04ff..dc70c61 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -790,6 +790,14 @@ on_self_contact_changed (TpConnection *self,
return;
}
+ if (self->priv->last_known_self_handle == self_handle &&
+ !tp_strdiff (self_id, self->priv->last_known_self_id))
+ {
+ DEBUG ("Ignoring no-op self-handle change to %u '%s'",
+ self_handle, self_id);
+ return;
+ }
+
DEBUG ("SelfHandleChanged to %u '%s'", self_handle, self_id);
self->priv->last_known_self_handle = self_handle;
g_free (self->priv->last_known_self_id);
More information about the telepathy-commits
mailing list