summaryrefslogtreecommitdiffstats
path: root/hcid/passkey-agent.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-03-10 23:37:20 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-03-10 23:37:20 +0000
commit2a5270a5406335a6ba55ddf3a6cf31ab24622964 (patch)
tree90445cb2c46c68ea757b2c1a1d8e361bce97306c /hcid/passkey-agent.c
parent59d9a9a0eee7f3148e0ab7304fad96f21ddc69c6 (diff)
Unregister the passkey agent correctly
Diffstat (limited to 'hcid/passkey-agent.c')
-rw-r--r--hcid/passkey-agent.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/hcid/passkey-agent.c b/hcid/passkey-agent.c
index b7eeb068..a6c06a77 100644
--- a/hcid/passkey-agent.c
+++ b/hcid/passkey-agent.c
@@ -128,6 +128,21 @@ int main(int argc, char **argv)
break;
}
+ msg = dbus_message_new_method_call("org.bluez", "/org/bluez/Manager",
+ "org.bluez.Security", "UnregisterDefaultPasskeyAgent");
+
+ if (!msg) {
+ fprintf(stderr, "Can't allocate new method call\n");
+ exit(1);
+ }
+
+ dbus_message_iter_init_append(msg, &iter);
+ dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &agent_path);
+
+ reply = dbus_connection_send_with_reply_and_block(conn, msg, -1, &err);
+
+ dbus_message_unref(msg);
+
dbus_connection_close(conn);
return 0;