diff options
| author | David Woodhouse <David.Woodhouse@intel.com> | 2008-09-13 20:13:08 -0700 | 
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-09-13 20:13:08 -0700 | 
| commit | e2a5786af8c8278eeeb0bedccda32c7422e9a2b7 (patch) | |
| tree | 4f0f622810d0d63306d7d72dee340d6bccea8ae0 | |
| parent | dca79443166a7b2e28bd59a756cc9ad4ddcca270 (diff) | |
store pnp info when we receive a pnp record
| -rw-r--r-- | src/device.c | 18 | ||||
| -rw-r--r-- | src/device.h | 2 | 
2 files changed, 20 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); diff --git a/src/device.h b/src/device.h index d2331173..21f7ffaa 100644 --- a/src/device.h +++ b/src/device.h @@ -45,6 +45,8 @@ uint8_t device_get_auth(struct btd_device *device);  #define BTD_UUIDS(args...) ((const char *[]) { args, NULL } ) +#define PNP_UUID		"00001200-0000-1000-8000-00805f9b34fb" +  struct btd_device_driver {  	const char *name;  	const char **uuids; | 
