diff options
Diffstat (limited to 'hcid/agent.c')
-rw-r--r-- | hcid/agent.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hcid/agent.c b/hcid/agent.c index edd8cf05..fca002c2 100644 --- a/hcid/agent.c +++ b/hcid/agent.c @@ -112,6 +112,9 @@ static void agent_free(struct agent *agent) if (agent->request) { DBusError err; + dbus_error_init(&err); + dbus_set_error_const(&err, "org.bluez.Error.Failed", "Canceled"); + if (agent->request->type == AGENT_REQUEST_PASSKEY) { agent_passkey_cb cb = agent->request->cb; cb(agent, &err, NULL, agent->request->user_data); @@ -120,6 +123,8 @@ static void agent_free(struct agent *agent) cb(agent, &err, agent->request->user_data); } + dbus_error_free(&err); + send_cancel_request(agent->request); } |