diff options
| author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-01-15 15:25:00 +0200 | 
|---|---|---|
| committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-01-15 15:25:00 +0200 | 
| commit | 4bf138ac2a5e9ff0cf186ec6cc51bf8f80fc949e (patch) | |
| tree | bf9c777204433df12d07fac0a6d3f1dc2bf88073 /src | |
| parent | 5cfcdb72227f3855e90e45dca75c83005ec5267b (diff) | |
Fix device creation for incoming security mode 3 connects
Diffstat (limited to 'src')
| -rw-r--r-- | src/dbus-hci.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/src/dbus-hci.c b/src/dbus-hci.c index 5b502f3f..61d99dc1 100644 --- a/src/dbus-hci.c +++ b/src/dbus-hci.c @@ -931,9 +931,9 @@ void hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,  	ba2str(peer, peer_addr); -	device = adapter_find_device(adapter, peer_addr); +	device = adapter_get_device(connection, adapter, peer_addr);  	if (!device) { -		error("link_key_notify: device %s was removed!", peer_addr); +		error("Couldn't get a device object for %s", peer_addr);  		return;  	} @@ -942,6 +942,8 @@ void hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,  	if (old_key_type != 0xFF)  		device_set_renewed_key(device, TRUE); +	device_set_temporary(device, FALSE); +  	if (!device_is_connected(device))  		device_set_secmode3_conn(device, TRUE);  	else if (!device_is_bonding(device, NULL) && old_key_type == 0xFF) | 
