[PATCH 1/6] audio/avdtp: Fix not calling callback if DISCOVER is rejected

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

 



If DISCOVER command is rejected and a callback exists it should be
called with the reject error, this fixes test /TP/SIG/SMG/BI-01-C

This patches is made based on
262e11982bfb94d0da66a862facf6e71330ef23fjk.
---
 profiles/audio/avdtp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c
index f38188f..14f9a61 100644
--- a/profiles/audio/avdtp.c
+++ b/profiles/audio/avdtp.c
@@ -2919,6 +2919,12 @@ static gboolean avdtp_parse_rej(struct avdtp *session,
 			return FALSE;
 		error("DISCOVER request rejected: %s (%d)",
 				avdtp_strerror(&err), err.err.error_code);
+		if (session->discover) {
+			session->discover->cb(session, session->seps, &err,
+						session->discover->user_data);
+			g_free(session->discover);
+			session->discover = NULL;
+		}
 		return TRUE;
 	case AVDTP_GET_CAPABILITIES:
 	case AVDTP_GET_ALL_CAPABILITIES:
-- 
2.1.4

--
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