diff options
-rw-r--r-- | hcid/passkey-agent.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hcid/passkey-agent.c b/hcid/passkey-agent.c index b46ba96b..276cd546 100644 --- a/hcid/passkey-agent.c +++ b/hcid/passkey-agent.c @@ -139,10 +139,10 @@ static DBusHandlerResult release_message(DBusConnection *conn, static DBusHandlerResult agent_message(DBusConnection *conn, DBusMessage *msg, void *data) { - if (dbus_message_is_method_call(msg, INTERFACE, "Request")) + if (dbus_message_is_method_call(msg, "org.bluez.PasskeyAgent", "Request")) return request_message(conn, msg, data); - if (dbus_message_is_method_call(msg, INTERFACE, "Release")) + if (dbus_message_is_method_call(msg, "org.bluez.PasskeyAgent", "Release")) return release_message(conn, msg, data); return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; @@ -198,8 +198,6 @@ static int register_agent(DBusConnection *conn, const char *agent_path, dbus_connection_flush(conn); - dbus_connection_unregister_object_path(conn, agent_path); - return 0; } @@ -244,6 +242,8 @@ static int unregister_agent(DBusConnection *conn, const char *agent_path, dbus_connection_flush(conn); + dbus_connection_unregister_object_path(conn, agent_path); + return 0; } |