From a3b3fc40021f9ff1cacdb54889ac1d98f614f45d Mon Sep 17 00:00:00 2001 From: Scott James Remnant Date: Thu, 5 Apr 2012 15:29:38 -0700 Subject: [PATCH] Display PIN generated by plugin If a plugin pincode callback sets the display parameter to TRUE, send the generated PIN to the agent for display using the new DisplayPinCode agent method, including its fallback to RequestPinCode. --- src/event.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/event.c b/src/event.c index b37f41169..876bd37a6 100644 --- a/src/event.c +++ b/src/event.c @@ -127,6 +127,11 @@ int btd_event_request_pin(bdaddr_t *sba, bdaddr_t *dba, gboolean secure) memset(pin, 0, sizeof(pin)); pinlen = btd_adapter_get_pin(adapter, device, pin, &display); if (pinlen > 0 && (!secure || pinlen == 16)) { + if (display && device_is_bonding(device, NULL)) + return device_request_authentication(device, + AUTH_TYPE_NOTIFY_PINCODE, pin, + secure, pincode_cb); + btd_adapter_pincode_reply(adapter, dba, pin, pinlen); return 0; } -- 2.47.3