diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-09-14 18:23:44 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-09-14 18:23:44 +0200 |
commit | fce6db565f747ca9ad560f7d8bff6a45522d905c (patch) | |
tree | f6210ab0d7bc1b33ea676711647d63dc367ed939 /src/device.c | |
parent | a90bb1223be9413d5ef76a18d16bbc0de757ceda (diff) |
Store source information from DID record
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/device.c b/src/device.c index eadc9d51..c9d1d310 100644 --- a/src/device.c +++ b/src/device.c @@ -831,9 +831,12 @@ static void update_services(struct browse_req *req, sdp_list_t *recs) continue; if (!strcasecmp(uuid_str, PNP_UUID)) { - uint16_t vendor, product, version; + uint16_t source, vendor, product, version; sdp_data_t *pdlist; + pdlist = sdp_data_get(rec, SDP_ATTR_VENDOR_ID_SOURCE); + source = pdlist ? pdlist->val.uint16 : 0x0000; + pdlist = sdp_data_get(rec, SDP_ATTR_VENDOR_ID); vendor = pdlist ? pdlist->val.uint16 : 0x0000; @@ -843,12 +846,12 @@ static void update_services(struct browse_req *req, sdp_list_t *recs) 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); + if (source || vendor || product || version) + store_device_id(srcaddr, dstaddr, source, + vendor, product, version); } - /* Driver uuid found */ + /* Driver UUID found */ l = g_slist_find_custom(req->uuids, uuid_str, (GCompareFunc) strcasecmp); if (l) { |