libbonobo r3480 - in trunk: . activation-server
- From: michael svn gnome org
- To: svn-commits-list gnome org
- Subject: libbonobo r3480 - in trunk: . activation-server
- Date: Mon,  7 Jul 2008 10:30:33 +0000 (UTC)
Author: michael
Date: Mon Jul  7 10:30:33 2008
New Revision: 3480
URL: http://svn.gnome.org/viewvc/libbonobo?rev=3480&view=rev
Log:
2008-07-07  Michael Meeks  <michael meeks novell com>
        * activation-server/activation-context-corba.c (ac_rescan),
        * activation-server/object-directory-corba.c (as_rescan): 
        fix identical bug in cut/paste code (urgh): we should reset
        idle_id in the idle handler, so we can cope with the race
        more than once. Switch to a 100ms timeout from idle too: to
        cope with lots of app death on Zap more efficiently.
Modified:
   trunk/ChangeLog
   trunk/activation-server/activation-context-corba.c
   trunk/activation-server/object-directory-corba.c
Modified: trunk/activation-server/activation-context-corba.c
==============================================================================
--- trunk/activation-server/activation-context-corba.c	(original)
+++ trunk/activation-server/activation-context-corba.c	Mon Jul  7 10:30:33 2008
@@ -354,17 +354,20 @@
 }
 
 static gboolean
-ac_rescan (gpointer data)
+ac_rescan (gpointer is_idle_rescan)
 {
         static gboolean in_rescan = FALSE;
         static guint idle_id = 0;
 
         server_lock ();
 
+        if (GPOINTER_TO_UINT (is_idle_rescan))
+                idle_id = 0;
+
         /* We tend to get a lot of 'broken' callbacks at once */
         if (in_rescan) {
                 if (!idle_id)
-                        idle_id = g_idle_add (ac_rescan, NULL);
+                        idle_id = g_timeout_add (100, ac_rescan, GUINT_TO_POINTER(1));
                 server_unlock ();
                 return FALSE;
         }
Modified: trunk/activation-server/object-directory-corba.c
==============================================================================
--- trunk/activation-server/object-directory-corba.c	(original)
+++ trunk/activation-server/object-directory-corba.c	Mon Jul  7 10:30:33 2008
@@ -687,7 +687,7 @@
 }
 
 static gboolean
-as_rescan (gpointer data)
+as_rescan (gpointer is_idle_rescan)
 {
         ObjectDirectory *od;
         static gboolean in_rescan = FALSE;
@@ -695,6 +695,9 @@
 
         server_lock ();
 
+        if (GPOINTER_TO_UINT (is_idle_rescan))
+                idle_id = 0;
+
         if (!(od = main_dir)) { /* shutting down */
                 server_unlock ();
                 return FALSE;
@@ -703,7 +706,7 @@
         /* We tend to get a lot of 'broken' callbacks at once */
         if (in_rescan) {
                 if (!idle_id)
-                        idle_id = g_idle_add (as_rescan, NULL);
+                        idle_id = g_timeout_add (100, as_rescan, GUINT_TO_POINTER (1));
                 server_unlock ();
                 return FALSE;
         }
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]