summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2009-10-27 18:24:11 -0200
committerMarcel Holtmann <marcel@holtmann.org>2009-10-29 22:49:50 +0900
commitdab8e45d2e335742f628676dced064bc099ecd09 (patch)
treec6d9939acd1a01b65e9cd0849fdfb8aa304e807e
parent8f499841cfcdb8c176679f2d26f993a1ec5f3083 (diff)
downloadofono-dab8e45d2e335742f628676dced064bc099ecd09.tar.bz2
Fix message handling for autostart.
Current implementation of libdbus Request name is blocking, consequently the first incomming message that triggered the service autostart is not being processed properly.
-rw-r--r--gdbus/mainloop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdbus/mainloop.c b/gdbus/mainloop.c
index a06ed220..bd775f8b 100644
--- a/gdbus/mainloop.c
+++ b/gdbus/mainloop.c
@@ -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;
}