Diff between c75eaca91670f0f93f3e967342ea70ffaa91afce and cb5058cf26e4ad6fd857fd480675cd6fcd4b7985

Changed Files

File Additions Deletions Status
android/avdtp.c +7 -9 modified

Full Patch

diff --git a/android/avdtp.c b/android/avdtp.c
index 3b605ae..40bb4be 100644
--- a/android/avdtp.c
+++ b/android/avdtp.c
@@ -2555,10 +2555,15 @@ static gboolean avdtp_parse_rej(struct avdtp *session,
 
 	switch (signal_id) {
 	case AVDTP_DISCOVER:
+	case AVDTP_GET_CAPABILITIES:
+	case AVDTP_GET_ALL_CAPABILITIES:
 		if (!seid_rej_to_err(buf, size, &err))
 			return FALSE;
-		error("DISCOVER request rejected: %s (%d)",
-				avdtp_strerror(&err), err.err.error_code);
+		error("%s request rejected: %s (%d)",
+			signal_id == AVDTP_DISCOVER ? "DISCOVER" :
+			signal_id == AVDTP_GET_CAPABILITIES ?
+			"GET_CAPABILITIES" : "GET_ALL_CAPABILITIES",
+			avdtp_strerror(&err), err.err.error_code);
 		if (session->discover) {
 			session->discover->cb(session, session->seps, &err,
 						session->discover->user_data);
@@ -2566,13 +2571,6 @@ static gboolean avdtp_parse_rej(struct avdtp *session,
 			session->discover = NULL;
 		}
 		return TRUE;
-	case AVDTP_GET_CAPABILITIES:
-	case AVDTP_GET_ALL_CAPABILITIES:
-		if (!seid_rej_to_err(buf, size, &err))
-			return FALSE;
-		error("GET_CAPABILITIES request rejected: %s (%d)",
-				avdtp_strerror(&err), err.err.error_code);
-		return TRUE;
 	case AVDTP_OPEN:
 		if (!seid_rej_to_err(buf, size, &err))
 			return FALSE;