/srv/mercurial-server/detachablepurple: 53e35dbdb7c2: Protected ...
Gilles Bedel
gillux at cpw.pidgin.im
Fri Jun 15 22:01:36 EDT 2012
Changeset: 53e35dbdb7c25c3ee567895bd12a302afece53c0
Author: Gilles Bedel <gillux at cpw.pidgin.im>
Date: 2012-05-15 03:19 +0000
Branch: cpw.gillux.detachablepurple
URL: http://hg.pidgin.im/srv/mercurial-server/detachablepurple/rev/53e35dbdb7c2
Description:
Protected the update of client object properties by the daemon with
the PropertyChanged D-Bus signal, to avoid endless loops of property
notifications between clients and daemon.
diffstat:
libpurple/pobject.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diffs (19 lines):
diff --git a/libpurple/pobject.c b/libpurple/pobject.c
--- a/libpurple/pobject.c
+++ b/libpurple/pobject.c
@@ -666,8 +666,15 @@
static void
purple_object_dbus_prop_changed(PurpleObject *pobj, const char *prop_name, GVariant *prop_value)
{
+ gboolean is_sync;
+
+ /* Temporary mark the object as not synchronized,
+ * so that we can locally update its property. */
+ is_sync = purple_object_get_synchronized(pobj);
+ purple_object_set_synchronized(pobj, FALSE);
if (!purple_object_set_dbus_property(pobj, prop_name, prop_value))
purple_debug_warning("dbus", "Ignored a PropertyChanged signal about a property we don't care: %s\n", prop_name);
+ purple_object_set_synchronized(pobj, is_sync);
}
void
More information about the Commits
mailing list