diff options
| author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-06-09 04:37:29 +0000 | 
|---|---|---|
| committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-06-09 04:37:29 +0000 | 
| commit | 8eae4fc054a6f522d9cbc24dbe824838056f0dcf (patch) | |
| tree | 83c35c3a15e9c20ce944add18fbc7fc8d1f6ece1 /hcid/security.c | |
| parent | 4aa07a5ae2035b9ad13c63c3cb85192c85d85252 (diff) | |
Add support for Simple Pairing User Notification event
Diffstat (limited to 'hcid/security.c')
| -rw-r--r-- | hcid/security.c | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/hcid/security.c b/hcid/security.c index 17cb2f56..9472930b 100644 --- a/hcid/security.c +++ b/hcid/security.c @@ -383,6 +383,14 @@ static void user_passkey_request(int dev, bdaddr_t *sba, void *ptr)  						AUTH_TYPE_PASSKEY);  } +static void user_passkey_notify(int dev, bdaddr_t *sba, void *ptr) +{ +	evt_user_passkey_notify *req = ptr; + +	if (hcid_dbus_user_notify(sba, &req->bdaddr, btohl(req->passkey)) == 0) +		hcid_dbus_new_auth_request(sba, &req->bdaddr, AUTH_TYPE_NOTIFY); +} +  static void remote_oob_data_request(int dev, bdaddr_t *sba, void *ptr)  {  	hci_send_cmd(dev, OGF_LINK_CTL, OCF_REMOTE_OOB_DATA_NEG_REPLY, 6, ptr); @@ -887,6 +895,10 @@ static gboolean io_security_event(GIOChannel *chan, GIOCondition cond, gpointer  		user_passkey_request(dev, &di->bdaddr, ptr);  		break; +	case EVT_USER_PASSKEY_NOTIFY: +		user_passkey_notify(dev, &di->bdaddr, ptr); +		break; +  	case EVT_REMOTE_OOB_DATA_REQUEST:  		remote_oob_data_request(dev, &di->bdaddr, ptr);  		break; | 
