Skip to contentSkip to conversation

android/AVDTP: Remove get_all parameter for get_capability callback

PATCH In review Luiz Augusto von Dentz 2 participants 3 messages Dec 23, 2013 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/2 android/AVDTP: Remove get_all parameter for get_capability callback

From: Luiz Augusto von Dentz <[email protected]>

This is not necessary anymore since all delay reporting is now added automatically whenever supported.

---
 android/avdtp.c   | 4 ++--
 android/avdtp.h   | 1 -
 unit/test-avdtp.c | 8 ++++----
 3 files changed, 6 insertions(+), 7 deletions(-)
android/avdtp.c +2 -2
index 02ee920..3cf390f 100644
@@ -1192,8 +1192,8 @@ static gboolean avdtp_getcap_cmd(struct avdtp *session, uint8_t transaction,
 		goto failed;
 	}
 
-	if (!sep->ind->get_capability(session, sep, get_all, &caps,
-							&err, sep->user_data))
+	if (!sep->ind->get_capability(session, sep, &caps, &err,
+							sep->user_data))
 		goto failed;
 
 	for (l = caps, rsp_size = 0; l != NULL; l = g_slist_next(l)) {
android/avdtp.h +0 -1
index d371653..e8d1907 100644
@@ -161,7 +161,6 @@ struct avdtp_sep_cfm {
 struct avdtp_sep_ind {
 	gboolean (*get_capability) (struct avdtp *session,
 					struct avdtp_local_sep *sep,
-					gboolean get_all,
 					GSList **caps, uint8_t *err,
 					void *user_data);
 	gboolean (*set_configuration) (struct avdtp *session,
unit/test-avdtp.c +4 -4
index 458daa7..66c45f3 100644
@@ -269,8 +269,8 @@ static void execute_context(struct context *context)
 
 static gboolean sep_getcap_ind(struct avdtp *session,
 					struct avdtp_local_sep *sep,
-					gboolean get_all, GSList **caps,
-					uint8_t *err, void *user_data)
+					GSList **caps, uint8_t *err,
+					void *user_data)
 {
 	struct avdtp_service_capability *media_transport, *media_codec;
 	struct avdtp_media_codec_capability *codec_caps;
@@ -550,8 +550,8 @@ static void test_server_0_sep(gconstpointer data)
 
 static gboolean sep_getcap_ind_frg(struct avdtp *session,
 					struct avdtp_local_sep *sep,
-					gboolean get_all, GSList **caps,
-					uint8_t *err, void *user_data)
+					GSList **caps, uint8_t *err,
+					void *user_data)
 {
 	struct avdtp_service_capability *media_transport, *media_codec;
 	struct avdtp_service_capability *content_protection;
Signature · 1 line
1.8.4.2
author maintainer
#1 lore raw

PATCH 2/2 android/AVDTP: Fix ignoring endpoint delay reporting

From: Luiz Augusto von Dentz <[email protected]>

The code was setting TRUE ignoring what the caller set.

---
 android/avdtp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
android/avdtp.c +1 -1
index 3cf390f..473e02b 100644
@@ -3280,7 +3280,7 @@ struct avdtp_local_sep *avdtp_register_sep(uint8_t type, uint8_t media_type,
 	sep->ind = ind;
 	sep->cfm = cfm;
 	sep->user_data = user_data;
-	sep->delay_reporting = TRUE;
+	sep->delay_reporting = delay_reporting;
 
 	DBG("SEP %p registered: type:%d codec:%d seid:%d", sep,
 			sep->info.type, sep->codec, sep->info.seid);
Signature · 1 line
1.8.4.2
#2 lore raw
In reply to Luiz Augusto von Dentz

Hi Luiz,

Quoted 54 lines

From: Luiz Augusto von Dentz <[email protected]>

This is not necessary anymore since all delay reporting is now added automatically whenever supported.

---
 android/avdtp.c   | 4 ++--
 android/avdtp.h   | 1 -
 unit/test-avdtp.c | 8 ++++----
 3 files changed, 6 insertions(+), 7 deletions(-)
android/avdtp.c +2 -2
index 02ee920..3cf390f 100644
@@ -1192,8 +1192,8 @@ static gboolean avdtp_getcap_cmd(struct avdtp *session, uint8_t transaction,
 		goto failed;
 	}
 
-	if (!sep->ind->get_capability(session, sep, get_all, &caps,
-							&err, sep->user_data))
+	if (!sep->ind->get_capability(session, sep, &caps, &err,
+							sep->user_data))
 		goto failed;
 
 	for (l = caps, rsp_size = 0; l != NULL; l = g_slist_next(l)) {
android/avdtp.h +0 -1
index d371653..e8d1907 100644
@@ -161,7 +161,6 @@ struct avdtp_sep_cfm {
 struct avdtp_sep_ind {
 	gboolean (*get_capability) (struct avdtp *session,
 					struct avdtp_local_sep *sep,
-					gboolean get_all,
 					GSList **caps, uint8_t *err,
 					void *user_data);
 	gboolean (*set_configuration) (struct avdtp *session,
unit/test-avdtp.c +2 -2
index 458daa7..66c45f3 100644
@@ -269,8 +269,8 @@ static void execute_context(struct context *context)
 
 static gboolean sep_getcap_ind(struct avdtp *session,
 					struct avdtp_local_sep *sep,
-					gboolean get_all, GSList **caps,
-					uint8_t *err, void *user_data)
+					GSList **caps, uint8_t *err,
+					void *user_data)
 {
 	struct avdtp_service_capability *media_transport, *media_codec;
 	struct avdtp_media_codec_capability *codec_caps;

unit/test-avdtp.c static void test_server_0_sep(gconstpointer data) · line 557

Quoted 10 lines
unit/test-avdtp.c +2 -2
@@ -550,8 +550,8 @@ static void test_server_0_sep(gconstpointer data)
 
 static gboolean sep_getcap_ind_frg(struct avdtp *session,
 					struct avdtp_local_sep *sep,
-					gboolean get_all, GSList **caps,
-					uint8_t *err, void *user_data)
+					GSList **caps, uint8_t *err,
+					void *user_data)
 {
 	struct avdtp_service_capability *media_transport, *media_codec;
 	struct avdtp_service_capability *content_protection;

Both patches applied, thanks.

Signature · 2 lines
BR
Szymon Janc