diff options
| author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-03 12:15:07 -0800 | 
|---|---|---|
| committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-03 12:19:00 -0800 | 
| commit | e35dd0c0246236371269b79cc28b1a23f4999560 (patch) | |
| tree | 59d611de1106fc3db522ac998e73234035a2c855 /src/device.c | |
| parent | f7d1ee361e410e096929bd3918178af356c50bbd (diff) | |
Add support for HCI_Simple_Pairing_Complete event
When we are the acceptors of a pairing request and we have used the
Agent.DisplayPasskey we need to use the Simple Pairing Complete HCI
event for calling Agent.Cancel.
Diffstat (limited to 'src/device.c')
| -rw-r--r-- | src/device.c | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/src/device.c b/src/device.c index 926d9591..df68639d 100644 --- a/src/device.c +++ b/src/device.c @@ -1816,9 +1816,24 @@ DBusMessage *device_create_bonding(struct btd_device *device,  	return NULL;  } +void device_simple_pairing_complete(struct btd_device *device, uint8_t status) +{ +	struct authentication_req *auth = device->authr; + +	if (auth && auth->type == AUTH_TYPE_NOTIFY && auth->agent) +		agent_cancel(auth->agent); + +	g_free(auth); +	device->authr = NULL; +} +  void device_bonding_complete(struct btd_device *device, uint8_t status)  {  	struct bonding_req *bonding = device->bonding; +	struct authentication_req *auth = device->authr; + +	if (auth && auth->type == AUTH_TYPE_NOTIFY && auth->agent) +		agent_cancel(auth->agent);  	if (status)  		goto failed; | 
