Diff between ea3f4047e452b081e34d017cce316aba9d623301 and 65fbc47143a5b0e8b889d39b758fe0056e54bc59

Changed Files

File Additions Deletions Status
src/shared/vcp.c +5 -5 modified

Full Patch

diff --git a/src/shared/vcp.c b/src/shared/vcp.c
index f0887ad..3216867 100644
--- a/src/shared/vcp.c
+++ b/src/shared/vcp.c
@@ -2119,15 +2119,15 @@ static bool vcp_set_volume_client(struct bt_vcp *vcp, uint8_t volume)
 	 * the current one completes. This may skip over some volume changes,
 	 * as it only sends a request for the final value.
 	 */
-	if (vcp->volume == volume) {
+	if (vcp->pending_op.timeout_id) {
+		vcp->pending_op.volume = volume;
+		vcp->pending_op.resend = true;
+		return true;
+	} else if (vcp->volume == volume) {
 		/* Do not set to current value, as that doesn't generate
 		 * a notification
 		 */
 		return true;
-	} else if (vcp->pending_op.timeout_id) {
-		vcp->pending_op.volume = volume;
-		vcp->pending_op.resend = true;
-		return true;
 	}
 
 	req.op = BT_VCS_SET_ABSOLUTE_VOL;