[gconf] gconf-dbus: Do not drop old databases that have clients listening to it



commit 54318ebf218743ea1a3353f940eb8f44767fd2bb
Author: Vincent Untz <vuntz gnome org>
Date:   Mon Oct 17 20:02:08 2011 +0200

    gconf-dbus: Do not drop old databases that have clients listening to it
    
    This would be bad as clients would get lost when the object path of this
    dropped database disappears.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=659835

 gconf/gconfd.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gconf/gconfd.c b/gconf/gconfd.c
index 33deb48..bc62af4 100644
--- a/gconf/gconfd.c
+++ b/gconf/gconfd.c
@@ -1280,6 +1280,10 @@ drop_old_databases(void)
       
       if (db->listeners &&                             /* not already hibernating */
           gconf_listeners_count(db->listeners) == 0 && /* Can hibernate */
+#ifdef HAVE_DBUS
+          db->listening_clients &&
+          g_hash_table_size (db->listening_clients) == 0 &&
+#endif
           (now - db->last_access) > (60*20))           /* 20 minutes without access */
         {
           dead = g_list_prepend (dead, db);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]