summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>2011-06-02 15:37:41 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2011-06-08 10:04:23 +0900
commit90ec29300d038984a6246f90779c13ee49340e1f (patch)
tree41690599c60843b98c121073852622969a409742 /plugins
parent4b609b812fdcd042dc99cd201aeb18d598baa7b8 (diff)
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.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/hciops.c2
-rw-r--r--plugins/mgmtops.c2
2 files changed, 2 insertions, 2 deletions
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);