diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 174f401..0d39581 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
struct avctp_channel *chan;
uint8_t transaction;
guint timeout;
+ bool retry;
int err;
avctp_process_cb process;
void *data;
struct avctp_channel *chan = user_data;
struct avctp_pending_req *p = chan->p;
- DBG("transaction %u", p->transaction);
+ DBG("transaction %u retry %s", p->transaction, p->retry ? "true" :
+ "false");
p->timeout = 0;
+
+ if (p->retry) {
+ p->process(p->data);
+ return FALSE;
+ }
+
p->err = -ETIMEDOUT;
pending_destroy(p, NULL);
if (ret < 0)
return ret;
+ if (req->op != AVC_OP_PASSTHROUGH)
+ p->retry = !p->retry;
+
p->timeout = g_timeout_add_seconds(CONTROL_TIMEOUT, req_timeout,
p->chan);