[PATCH BlueZ 3/3] input: Use defines for SDP attribute names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 profiles/input/device.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/profiles/input/device.c b/profiles/input/device.c
index 0c71786..6bcc6a5 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
@@ -207,15 +207,15 @@ static void extract_hid_record(sdp_record_t *rec, struct hidp_connadd_req *req)
 	sdp_data_t *pdlist, *pdlist2;
 	uint8_t attr_val;
 
-	pdlist = sdp_data_get(rec, 0x0101);
-	pdlist2 = sdp_data_get(rec, 0x0102);
+	pdlist = sdp_data_get(rec, SDP_ATTR_SVCDESC_PRIMARY);
+	pdlist2 = sdp_data_get(rec, SDP_ATTR_PROVNAME_PRIMARY);
 	if (pdlist && pdlist2 &&
 				strncmp(pdlist->val.str, pdlist2->val.str, 5)) {
 		snprintf(req->name, sizeof(req->name), "%s %s",
 					pdlist2->val.str, pdlist->val.str);
 	} else {
 		if (!pdlist)
-			pdlist = sdp_data_get(rec, 0x0100);
+			pdlist = sdp_data_get(rec, SDP_ATTR_SVCNAME_PRIMARY);
 
 		if (pdlist)
 			snprintf(req->name, sizeof(req->name), "%s",
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux