diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-06-10 12:27:33 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-06-10 12:27:33 +0000 |
commit | a715f1cb05569ff136bf277fe43e87a08b8a50f7 (patch) | |
tree | 5180fca3059e664429f1dfaef8031226eeed7206 /hcid | |
parent | 97c70dad4b624a35eb678cc69b77ccf41884cbe0 (diff) |
Call agent_cancel only after doing the error callback
Diffstat (limited to 'hcid')
-rw-r--r-- | hcid/agent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hcid/agent.c b/hcid/agent.c index da3fb319..91dbd2d9 100644 --- a/hcid/agent.c +++ b/hcid/agent.c @@ -158,8 +158,6 @@ static void agent_free(struct agent *agent) agent_pincode_cb pincode_cb; agent_cb cb; - agent_cancel(agent); - dbus_error_init(&err); dbus_set_error_const(&err, "org.bluez.Error.Failed", "Canceled"); @@ -174,6 +172,8 @@ static void agent_free(struct agent *agent) } dbus_error_free(&err); + + agent_cancel(agent); } if (!agent->exited) { |