From 893f5b7bf561922dafae9d8397b82ee9ee35ad49 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Wed, 13 Apr 2005 14:10:21 +0000 Subject: 2005-04-13 Havoc Pennington * 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 | 6 ++++++ glib/dbus-gmain.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 34b0e262..61656003 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-04-13 Havoc Pennington + + * 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 * dbus/dbus-string.c (copy): change a memcpy to memmove due to diff --git a/glib/dbus-gmain.c b/glib/dbus-gmain.c index 57be8490..1843f224 100644 --- a/glib/dbus-gmain.c +++ b/glib/dbus-gmain.c @@ -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); -- cgit