gdbus: Replace g_timeout_add with g_idle_add
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 18 Feb 2014 20:16:56 +0000 (22:16 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 19 Feb 2014 07:13:53 +0000 (23:13 -0800)
Passing 0 as timeout to g_timeout_add should equivalent to g_idle_add.

gdbus/mainloop.c

index ec52554..435fb93 100644 (file)
@@ -30,8 +30,6 @@
 
 #include "gdbus.h"
 
-#define DISPATCH_TIMEOUT  0
-
 #define info(fmt...)
 #define error(fmt...)
 #define debug(fmt...)
@@ -82,8 +80,7 @@ static inline void queue_dispatch(DBusConnection *conn,
                                                DBusDispatchStatus status)
 {
        if (status == DBUS_DISPATCH_DATA_REMAINS)
-               g_timeout_add(DISPATCH_TIMEOUT, message_dispatch,
-                                               dbus_connection_ref(conn));
+               g_idle_add(message_dispatch, dbus_connection_ref(conn));
 }
 
 static gboolean watch_func(GIOChannel *chan, GIOCondition cond, gpointer data)