From 90ec29300d038984a6246f90779c13ee49340e1f Mon Sep 17 00:00:00 2001 From: Waldemar Rymarkiewicz Date: Thu, 2 Jun 2011 15:37:41 +0200 Subject: Add support of secure pin code in mgmt code Use secure pin code parameter received from the kernel in MGMT_EV_PIN_CODE_REQUEST event and propagate this to agent code. Secure flag is specific for the pin code request only. --- plugins/hciops.c | 2 +- plugins/mgmtops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/hciops.c b/plugins/hciops.c index 9b1225c85..6ce0e27b9 100644 --- a/plugins/hciops.c +++ b/plugins/hciops.c @@ -1344,7 +1344,7 @@ static void pin_code_request(int index, bdaddr_t *dba) goto reject; } - err = btd_event_request_pin(&dev->bdaddr, dba); + err = btd_event_request_pin(&dev->bdaddr, dba, FALSE); if (err < 0) { error("PIN code negative reply: %s", strerror(-err)); goto reject; diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c index 95de3d17c..430281381 100644 --- a/plugins/mgmtops.c +++ b/plugins/mgmtops.c @@ -563,7 +563,7 @@ static void mgmt_pin_code_request(int sk, uint16_t index, void *buf, size_t len) info = &controllers[index]; - err = btd_event_request_pin(&info->bdaddr, &ev->bdaddr); + err = btd_event_request_pin(&info->bdaddr, &ev->bdaddr, ev->secure); if (err < 0) { error("btd_event_request_pin: %s", strerror(-err)); mgmt_pincode_reply(index, &ev->bdaddr, NULL, 0); -- cgit v1.2.3