diff options
| -rw-r--r-- | hcid/dbus-hci.c | 2 | ||||
| -rw-r--r-- | hcid/device.c | 5 | ||||
| -rw-r--r-- | hcid/device.h | 1 | 
3 files changed, 7 insertions, 1 deletions
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c index 91c0a584..389a0b56 100644 --- a/hcid/dbus-hci.c +++ b/hcid/dbus-hci.c @@ -977,7 +977,7 @@ int hcid_dbus_user_confirm(bdaddr_t *sba, bdaddr_t *dba, uint32_t passkey)  	}  	/* If no MITM protection required, auto-accept */ -	if (!(device->auth & 0x01) && !(type & 0x01)) { +	if (!(device_get_auth(device) & 0x01) && !(type & 0x01)) {  		int dd;  		dd = hci_open_dev(adapter->dev_id); diff --git a/hcid/device.c b/hcid/device.c index 8de26cf1..8d63590c 100644 --- a/hcid/device.c +++ b/hcid/device.c @@ -1002,6 +1002,11 @@ void device_set_auth(struct device *device, uint8_t auth)  	device->auth = auth;  } +uint8_t device_get_auth(struct device *device) +{ +	return device->auth; +} +  int btd_register_device_driver(struct btd_device_driver *driver)  {  	const char **uuid; diff --git a/hcid/device.h b/hcid/device.h index 243b5f4f..2f1daecf 100644 --- a/hcid/device.h +++ b/hcid/device.h @@ -66,6 +66,7 @@ gboolean device_is_temporary(struct device *device);  void device_set_temporary(struct device *device, gboolean temporary);  void device_set_cap(struct device *device, uint8_t cap);  void device_set_auth(struct device *device, uint8_t auth); +uint8_t device_get_auth(struct device *device);  #define BTD_UUIDS(args...) ((const char *[]) { args, NULL } )  | 
