summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hcid/agent.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hcid/agent.c b/hcid/agent.c
index e0111b0b..a5f2dd40 100644
--- a/hcid/agent.c
+++ b/hcid/agent.c
@@ -304,7 +304,8 @@ int agent_authorize(struct agent *agent,
{
struct agent_request *req;
- debug("agent_authorize");
+ if (agent->request)
+ return -EBUSY;
req = agent_request_new(agent, device, cb, user_data);
@@ -426,6 +427,9 @@ int agent_request_passkey(struct agent *agent, const char *device,
{
struct agent_request *req;
+ if (agent->request)
+ return -EBUSY;
+
req = agent_request_new(agent, device, cb, user_data);
req->call = passkey_request_new(device, agent, FALSE);
@@ -528,6 +532,9 @@ int agent_confirm(struct agent *agent, const char *device, const char *pin,
{
struct agent_request *req;
+ if (agent->request)
+ return -EBUSY;
+
debug("Calling Agent.Confirm: name=%s, path=%s",
agent->name, agent->path);