diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-08-29 22:28:32 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-08-29 22:28:32 -0700 |
commit | 29ff3552e43a2fe58a1e49ca469ff50932146509 (patch) | |
tree | a9257ecdc40c32af5c63ca7743d48143f5c9b63d /src/agent.c | |
parent | b2b6bdad0116ca1c42a72b6cc60a5268e61ff219 (diff) | |
download | connman-29ff3552e43a2fe58a1e49ca469ff50932146509.tar.gz connman-29ff3552e43a2fe58a1e49ca469ff50932146509.tar.bz2 connman-29ff3552e43a2fe58a1e49ca469ff50932146509.zip |
Remove all the useless D-Bus connection passing
Diffstat (limited to 'src/agent.c')
-rw-r--r-- | src/agent.c | 11 |
1 files changed, 7 insertions, 4 deletions
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); |