summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-02-08 03:35:46 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-02-08 03:35:46 +0000
commit9b993dda376d1c74575ed8984b0cf07d1d671f8c (patch)
treeebbbd6b1521273dc55a0b6cb281fe68f72b8c626 /hcid
parentc5f81f1139c33eccc59146d45893c8037d63e94f (diff)
Request remote name after successful connection creation
Diffstat (limited to 'hcid')
-rw-r--r--hcid/security.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hcid/security.c b/hcid/security.c
index c3c8caeb..633583c8 100644
--- a/hcid/security.c
+++ b/hcid/security.c
@@ -525,6 +525,18 @@ static inline void remote_features_information(int dev, bdaddr_t *sba, void *ptr
write_features_info(sba, &dba, evt->features);
}
+static inline void name_resolve(int dev, bdaddr_t *bdaddr)
+{
+ remote_name_req_cp cp;
+
+ memset(&cp, 0, sizeof(cp));
+ bacpy(&cp.bdaddr, bdaddr);
+ cp.pscan_rep_mode = 0x02;
+
+ hci_send_cmd(dev, OGF_LINK_CTL, OCF_REMOTE_NAME_REQ,
+ REMOTE_NAME_REQ_CP_SIZE, &cp);
+}
+
static inline void conn_complete(int dev, bdaddr_t *sba, void *ptr)
{
evt_conn_complete *evt = ptr;
@@ -532,6 +544,8 @@ static inline void conn_complete(int dev, bdaddr_t *sba, void *ptr)
if (evt->status)
return;
+ name_resolve(dev, &evt->bdaddr);
+
hcid_dbus_conn_complete(sba, &evt->bdaddr);
}