summaryrefslogtreecommitdiffstats
path: root/hcid/agent.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-05-29 14:43:27 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2008-05-29 14:43:27 +0000
commitcc0f97ec2cb298bde87cd3753fd96f11ce41ff64 (patch)
treee02bb5f68ca60810d2793708939306174f4aa100 /hcid/agent.c
parent4baf1de49d3aad2837a968a18a7181d568ff9457 (diff)
Change name_listener API to libgdbus watch API
Diffstat (limited to 'hcid/agent.c')
-rw-r--r--hcid/agent.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/hcid/agent.c b/hcid/agent.c
index 831f68b2..b2fbe03c 100644
--- a/hcid/agent.c
+++ b/hcid/agent.c
@@ -126,11 +126,11 @@ static void agent_request_free(struct agent_request *req)
g_free(req);
}
-static void agent_exited(const char *name, void *user_data)
+static void agent_exited(void *user_data)
{
struct agent *agent = user_data;
- debug("Agent %s exited without calling Unregister", name);
+ debug("Agent exited without calling Unregister");
agent_destroy(agent, TRUE);
}
@@ -172,7 +172,7 @@ static void agent_free(struct agent *agent)
g_source_remove(agent->timeout);
if (!agent->exited) {
- name_listener_id_remove(agent->listener_id);
+ g_dbus_remove_watch(connection, agent->listener_id);
agent_release(agent);
}
@@ -217,8 +217,9 @@ struct agent *agent_create(struct adapter *adapter, const char *name,
(GSourceFunc) agent_timeout, agent);
}
- agent->listener_id = name_listener_add(connection, name, agent_exited,
- agent);
+ agent->listener_id = g_dbus_add_disconnect_watch(connection, name,
+ agent_exited, agent,
+ NULL);
return agent;
}