Diff between d94280557eb30537d319329c0a2e40d778fd35dd and dfaecf7d0c1c0cc084c0f7a21f73870926e9ef6e

Changed Files

File Additions Deletions Status
profiles/audio/avctp.c +10 -1 modified

Full Patch

diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index f8ec19c..174f401 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -62,6 +62,7 @@
 #define AVC_PRESS_TIMEOUT	2
 
 #define CONTROL_TIMEOUT		AVC_PRESS_TIMEOUT
+#define BROWSING_TIMEOUT	10
 
 #define QUIRK_NO_RELEASE 1 << 0
 
@@ -810,9 +811,17 @@ static int process_browsing(void *data)
 {
 	struct avctp_browsing_req *req = data;
 	struct avctp_pending_req *p = req->p;
+	int ret;
 
-	return avctp_browsing_send(p->chan, p->transaction, AVCTP_COMMAND,
+	ret = avctp_browsing_send(p->chan, p->transaction, AVCTP_COMMAND,
 					req->operands, req->operand_count);
+	if (ret < 0)
+		return ret;
+
+	p->timeout = g_timeout_add_seconds(BROWSING_TIMEOUT, req_timeout,
+								p->chan);
+
+	return 0;
 }
 
 static gboolean process_queue(void *user_data)