summaryrefslogtreecommitdiffstats
path: root/src/device.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-09-14 18:03:54 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-09-14 18:03:54 +0200
commita90bb1223be9413d5ef76a18d16bbc0de757ceda (patch)
treee6e02702aca1e0377515006905b3901701d9c9c0 /src/device.c
parenta6195ecddf5e2b284654ace85566ecd60ab06141 (diff)
parent6d7e8a0ee472260f615131154407561fbb615ec4 (diff)
Merge branch 'master' of git://git.infradead.org/users/dwmw2/bluez
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index a1d1575e..eadc9d51 100644
--- a/src/device.c
+++ b/src/device.c
@@ -830,6 +830,24 @@ static void update_services(struct browse_req *req, sdp_list_t *recs)
if (!uuid_str)
continue;
+ if (!strcasecmp(uuid_str, PNP_UUID)) {
+ uint16_t vendor, product, version;
+ sdp_data_t *pdlist;
+
+ pdlist = sdp_data_get(rec, SDP_ATTR_VENDOR_ID);
+ vendor = pdlist ? pdlist->val.uint16 : 0x0000;
+
+ pdlist = sdp_data_get(rec, SDP_ATTR_PRODUCT_ID);
+ product = pdlist ? pdlist->val.uint16 : 0x0000;
+
+ pdlist = sdp_data_get(rec, SDP_ATTR_VERSION);
+ version = pdlist ? pdlist->val.uint16 : 0x0000;
+
+ if (vendor || product || version)
+ store_pnp(srcaddr, dstaddr, vendor, product,
+ version);
+ }
+
/* Driver uuid found */
l = g_slist_find_custom(req->uuids, uuid_str,
(GCompareFunc) strcasecmp);