From 2f9fbeeb5931cda983aa72ed9a53b1f22d0aa85d Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 11 Sep 2008 14:21:09 -0300 Subject: Fix problem that occurs when a device is removed but agent requests are not cancelled. --- src/agent.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/agent.c') diff --git a/src/agent.c b/src/agent.c index 6b7c8d03..d514d191 100644 --- a/src/agent.c +++ b/src/agent.c @@ -780,6 +780,17 @@ gboolean agent_matches(struct agent *agent, const char *name, const char *path) return FALSE; } +gboolean agent_is_busy(struct agent *agent, void *user_data) +{ + if (agent->request) + return FALSE; + + if (user_data && user_data != agent->request->user_data) + return FALSE; + + return TRUE; +} + void agent_exit(void) { dbus_connection_unref(connection); -- cgit