2005-04-13 Havoc Pennington <hp@redhat.com>
authorHavoc Pennington <hp@redhat.com>
Wed, 13 Apr 2005 14:10:21 +0000 (14:10 +0000)
committerHavoc Pennington <hp@redhat.com>
Wed, 13 Apr 2005 14:10:21 +0000 (14:10 +0000)
* glib/dbus-gmain.c (message_queue_dispatch): only dispatch one
message at a time to avoid monopolizing the main loop, bug
#2953 from Benjamin Otte

ChangeLog
glib/dbus-gmain.c

index 34b0e26..6165600 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-04-13  Havoc Pennington  <hp@redhat.com>
+
+       * glib/dbus-gmain.c (message_queue_dispatch): only dispatch one
+       message at a time to avoid monopolizing the main loop, bug 
+       #2953 from Benjamin Otte
+
 2005-04-09  Havoc Pennington  <hp@redhat.com>
 
        * dbus/dbus-string.c (copy): change a memcpy to memmove due to
index 57be849..1843f22 100644 (file)
@@ -103,9 +103,9 @@ message_queue_dispatch (GSource     *source,
   DBusConnection *connection = ((DBusGMessageQueue *)source)->connection;
 
   dbus_connection_ref (connection);
-  
-  while (dbus_connection_dispatch (connection) == DBUS_DISPATCH_DATA_REMAINS)
-    ;
+
+  /* Only dispatch once - we don't want to starve other GSource */
+  dbus_connection_dispatch (connection);
   
   dbus_connection_unref (connection);