diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2008-06-11 03:59:47 +0000 | 
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2008-06-11 03:59:47 +0000 | 
| commit | 3c6856c212c6696eee02deae50788b102db8cf4d (patch) | |
| tree | 3d3de69bb72bc34cf503948db299cad54a1ad255 | |
| parent | 7244ccaea6e7e6eadec3b5b2e2be1f8b3d030d81 (diff) | |
Use auth requirement proposed by kernel if available
| -rw-r--r-- | hcid/dbus-hci.c | 9 | 
1 files changed, 3 insertions, 6 deletions
| diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c index 2bd32c23..94cbd18a 100644 --- a/hcid/dbus-hci.c +++ b/hcid/dbus-hci.c @@ -2454,19 +2454,16 @@ int hcid_dbus_get_io_cap(bdaddr_t *local, bdaddr_t *remote,  	debug("kernel authentication requirement = 0x%02x", type); +	*auth = (type == 0xff) ? 0x00 : type; +  	ba2str(remote, addr);  	device = adapter_find_device(adapter, addr);  	if (device && device->agent) {  		agent = device->agent;  		*auth = 0x03; -	} else { +	} else  		agent = adapter->agent; -		*auth = 0x00; -	} - -	if (type != 0xff && type & 0x01) -		*auth |= 0x01;  	if (!agent) {  		if (!(type & 0x01)) { | 
