diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-04-28 14:53:01 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-04-28 14:53:01 +0000 |
commit | 7a2ad6681fd5892577fe7d9c80d13eca96e99541 (patch) | |
tree | 8c9336afb948bdf0807fe45746ead93db9964a6e /hcid/security.c | |
parent | 403066f6cd6f4df68f68178acc2db0926370e95c (diff) |
Make D-Bus a mandatory requirement
Diffstat (limited to 'hcid/security.c')
-rw-r--r-- | hcid/security.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/hcid/security.c b/hcid/security.c index 6de61c67..d185f085 100644 --- a/hcid/security.c +++ b/hcid/security.c @@ -312,29 +312,6 @@ void set_pin_length(bdaddr_t *sba, int length) io_data[dev_id].pin_length = length; } -static void request_pin(int dev, bdaddr_t *sba, struct hci_conn_info *ci) -{ -#ifdef ENABLE_DBUS - hcid_dbus_request_pin(dev, sba, ci); -#else - pin_code_reply_cp pr; - char *pin = "BlueZ"; - int len; - - len = strlen(pin); - - set_pin_length(sba, len); - - memset(&pr, 0, sizeof(pr)); - bacpy(&pr.bdaddr, &ci->bdaddr); - memcpy(pr.pin_code, pin, len); - pr.pin_len = len; - - hci_send_cmd(dev, OGF_LINK_CTL, OCF_PIN_CODE_REPLY, - PIN_CODE_REPLY_CP_SIZE, &pr); -#endif -} - static void pin_code_request(int dev, bdaddr_t *sba, bdaddr_t *dba) { pin_code_reply_cp pr; @@ -393,12 +370,12 @@ static void pin_code_request(int dev, bdaddr_t *sba, bdaddr_t *dba) PIN_CODE_REPLY_CP_SIZE, &pr); } else { /* Let PIN helper handle that */ - request_pin(dev, sba, ci); + hcid_dbus_request_pin(dev, sba, ci); } } } else { /* Let PIN helper handle that */ - request_pin(dev, sba, ci); + hcid_dbus_request_pin(dev, sba, ci); } free(cr); |