diff options
| -rw-r--r-- | hcid/dbus-hci.c | 2 | ||||
| -rw-r--r-- | hcid/device.c | 8 | ||||
| -rw-r--r-- | hcid/device.h | 1 | 
3 files changed, 10 insertions, 1 deletions
| diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c index bc0e080a..91c0a584 100644 --- a/hcid/dbus-hci.c +++ b/hcid/dbus-hci.c @@ -2241,7 +2241,7 @@ int hcid_dbus_set_io_cap(bdaddr_t *local, bdaddr_t *remote,  	device = adapter_get_device(connection, adapter, addr);  	if (device) {  		device_set_cap(device, cap); -		device->auth = auth; +		device_set_auth(device, auth);  	}  	return 0; diff --git a/hcid/device.c b/hcid/device.c index 0ab5d595..8de26cf1 100644 --- a/hcid/device.c +++ b/hcid/device.c @@ -994,6 +994,14 @@ void device_set_cap(struct device *device, uint8_t cap)  	device->cap = cap;  } +void device_set_auth(struct device *device, uint8_t auth) +{ +	if (!device) +		return; + +	device->auth = 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 5abdb1a1..243b5f4f 100644 --- a/hcid/device.h +++ b/hcid/device.h @@ -65,6 +65,7 @@ gboolean device_is_busy(struct device *device);  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);  #define BTD_UUIDS(args...) ((const char *[]) { args, NULL } ) | 
