Fix message handling for autostart.
authorClaudio Takahasi <claudio.takahasi@openbossa.org>
Tue, 27 Oct 2009 20:24:11 +0000 (18:24 -0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 29 Oct 2009 13:50:08 +0000 (22:50 +0900)
Current implementation of libdbus Request name is blocking, consequently
the first incomming message that triggered the service autostart is not
being processed properly.

gdbus/mainloop.c

index a06ed22..bd775f8 100644 (file)
@@ -272,6 +272,9 @@ DBusConnection *g_dbus_setup_bus(DBusBusType type, const char *name,
 
        setup_dbus_with_main_loop(conn);
 
+       if (dbus_connection_get_dispatch_status(conn) == DBUS_DISPATCH_DATA_REMAINS)
+               g_timeout_add(DISPATCH_TIMEOUT, message_dispatch_cb, conn);
+
        return conn;
 }