[PATCH v1] obex: Check for supported features bit value for legacy server

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

 



This fix is required for below PTS testcase:

1. PBAP/PCE/SSM/BV-10-C
Description - Verify that the PCE does not share its
PbapSupportedFeatures bits with a legacy server.

Incase of legacy server, check for 'supported features bit'
uint_32_t value instead of directly checking the pointer
holding the attribute.
As pointer 'data' won't be null as PbapSupportedFeatures
attribute is present in SDP record but it's value is zero.

---
 obexd/client/pbap.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index bc3fdcf9f..09d3fd425 100644
--- a/obexd/client/pbap.c
+++ b/obexd/client/pbap.c
@@ -1219,6 +1219,7 @@ static void *pbap_supported_features(struct obc_session *session)
 {
 	const void *data;
 	uint16_t version;
+	uint32_t features;
 
 	/* Version */
 	data = obc_session_get_attribute(session, SDP_ATTR_PFILE_DESC_LIST);
@@ -1233,7 +1234,9 @@ static void *pbap_supported_features(struct obc_session *session)
 	/* Supported Feature Bits */
 	data = obc_session_get_attribute(session,
 					SDP_ATTR_PBAP_SUPPORTED_FEATURES);
-	if (!data)
+
+	features = *(uint32_t *) data;
+	if (!features)
 		return NULL;
 
 	return g_obex_apparam_set_uint32(NULL, SUPPORTED_FEATURES_TAG,
-- 
2.34.1





[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