[PATCH 3/6] audio/avdtp: Fix not calling callback if GET_CONFIGURATION is rejected

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

 



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

This patch is made based on 1ce1db5002f3b7714d1788a68ca06fd1849b68a0.
---
 profiles/audio/avdtp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c
index 57f2d16..ac89370 100644
--- a/profiles/audio/avdtp.c
+++ b/profiles/audio/avdtp.c
@@ -2949,6 +2949,15 @@ static gboolean avdtp_parse_rej(struct avdtp *session,
 			sep->cfm->set_configuration(session, sep, stream,
 							&err, sep->user_data);
 		return TRUE;
+	case AVDTP_GET_CONFIGURATION:
+		if (!seid_rej_to_err(buf, size, &err))
+			return FALSE;
+		error("GET_CONFIGURATION request rejected: %s (%d)",
+				avdtp_strerror(&err), err.err.error_code);
+		if (sep && sep->cfm && sep->cfm->get_configuration)
+			sep->cfm->get_configuration(session, sep, stream, &err,
+								sep->user_data);
+		return TRUE;
 	case AVDTP_RECONFIGURE:
 		if (!conf_rej_to_err(buf, size, &err))
 			return FALSE;
-- 
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