diff options
author | Scott James Remnant <scott@netsplit.com> | 2012-04-05 15:29:38 -0700 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-04-12 14:10:42 +0300 |
commit | a3b3fc40021f9ff1cacdb54889ac1d98f614f45d (patch) | |
tree | 8501eb2d465a00bbeb04b1ac329e053f3094875e | |
parent | 431a2352093e2b3de157d9baba69ab94f9a66e0d (diff) | |
download | bluez-a3b3fc40021f9ff1cacdb54889ac1d98f614f45d.tar.gz |
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.
-rw-r--r-- | src/event.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |