From 29ff3552e43a2fe58a1e49ca469ff50932146509 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 29 Aug 2009 22:28:32 -0700 Subject: Remove all the useless D-Bus connection passing --- src/agent.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/agent.c') diff --git a/src/agent.c b/src/agent.c index 5ae62b23..42a126e8 100644 --- a/src/agent.c +++ b/src/agent.c @@ -85,11 +85,11 @@ int __connman_agent_unregister(const char *sender, const char *path) return 0; } -int __connman_agent_init(DBusConnection *conn) +int __connman_agent_init(void) { - DBG("conn %p", conn); + DBG(""); - connection = dbus_connection_ref(conn); + connection = connman_dbus_get_connection(); if (connection == NULL) return -1; @@ -100,7 +100,10 @@ void __connman_agent_cleanup(void) { DBusMessage *msg; - DBG("conn %p", connection); + DBG(""); + + if (connection == NULL) + return; if (agent_watch > 0) g_dbus_remove_watch(connection, agent_watch); -- cgit v1.2.3