[PATCHv3 6/8] Display PIN generated by plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/event.c b/src/event.c
index b37f411..876bd37 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;
 	}
-- 
1.7.7.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux