cpw.gillux.detachablepurple: 59b50c96: Protected the update of client object pr...

gillux at soc.pidgin.im gillux at soc.pidgin.im
Mon May 14 23:26:55 EDT 2012

Revision: 59b50c96182297589484025e9bce58d5e9c87be3
Parent:   ac8786356f427d2f3a57233219efa1852471f021
Author:   gillux at soc.pidgin.im
Date:     05/14/12 23:19:41
Branch:   im.pidgin.cpw.gillux.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/59b50c96182297589484025e9bce58d5e9c87be3


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.

Changes against parent ac8786356f427d2f3a57233219efa1852471f021

  patched  libpurple/pobject.c

-------------- next part --------------
--- libpurple/pobject.c	e3d1d2a0015bd80e1f9d2982c7895d573d08a67f
+++ libpurple/pobject.c	31b3e0f66618b332d7c89307cff5cce7092b0778
@@ -666,8 +666,15 @@ purple_object_dbus_prop_changed(PurpleOb
 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);

More information about the Commits mailing list