linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/5] core: Fix registering '/org/bluez' path before '/'
@ 2012-11-15 14:05 Luiz Augusto von Dentz
  2012-11-15 14:05 ` [PATCH BlueZ 2/5] core: Make exit sequence consistent with init Luiz Augusto von Dentz
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2012-11-15 14:05 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This cause problems with ObjectManager being exported in both paths
---
 src/manager.c | 13 ++++++++-----
 src/manager.h |  2 +-
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/manager.c b/src/manager.c
index 07f9482..3088dd9 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -181,14 +181,17 @@ static const GDBusPropertyTable manager_properties[] = {
 	{ }
 };
 
-dbus_bool_t manager_init(const char *path)
+bool manager_init(const char *path)
 {
-	btd_profile_init();
-
-	return g_dbus_register_interface(btd_get_dbus_connection(),
+	if (!g_dbus_register_interface(btd_get_dbus_connection(),
 					"/", MANAGER_INTERFACE,
 					manager_methods, manager_signals,
-					manager_properties, NULL, NULL);
+					manager_properties, NULL, NULL))
+		return false;
+
+	btd_profile_init();
+
+	return true;
 }
 
 static void manager_set_default_adapter(int id)
diff --git a/src/manager.h b/src/manager.h
index 0bb8b2c..4d094b6 100644
--- a/src/manager.h
+++ b/src/manager.h
@@ -29,7 +29,7 @@
 
 typedef void (*adapter_cb) (struct btd_adapter *adapter, gpointer user_data);
 
-dbus_bool_t manager_init(const char *path);
+bool manager_init(const char *path);
 void manager_cleanup(const char *path);
 
 const char *manager_get_base_path(void);
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-11-15 14:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-15 14:05 [PATCH BlueZ 1/5] core: Fix registering '/org/bluez' path before '/' Luiz Augusto von Dentz
2012-11-15 14:05 ` [PATCH BlueZ 2/5] core: Make exit sequence consistent with init Luiz Augusto von Dentz
2012-11-15 14:15   ` Johan Hedberg
2012-11-15 14:05 ` [PATCH BlueZ 3/5] gdbus: Fix having multiple path exporting ObjectManager Luiz Augusto von Dentz
2012-11-15 14:05 ` [PATCH BlueZ 4/5] gdbus: Automatically register '/' path Luiz Augusto von Dentz
2012-11-15 14:05 ` [PATCH BlueZ 5/5] core: Make use of g_dbus_disconnect Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).