From edad0539112c36ccf277779a2c897fa94b11bbff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sun, 7 May 2023 16:06:16 +0200 Subject: [PATCH] pulse-server: pending-sample: set `replied` flag on error Set the `pending_sample::replied` flag when an error reply is sent to the client. --- src/modules/module-protocol-pulse/pending-sample.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/module-protocol-pulse/pending-sample.c b/src/modules/module-protocol-pulse/pending-sample.c index c98af3d48..8630bc59e 100644 --- a/src/modules/module-protocol-pulse/pending-sample.c +++ b/src/modules/module-protocol-pulse/pending-sample.c @@ -67,10 +67,12 @@ static void sample_play_done(void *data, int res) struct client *client = ps->client; struct impl *impl = client->impl; - if (res < 0) + if (res < 0) { reply_error(client, COMMAND_PLAY_SAMPLE, ps->tag, res); - else - pw_log_info("[%s] PLAY_SAMPLE done tag:%u", client->name, ps->tag); + ps->replied = true; + } + + pw_log_info("[%s] PLAY_SAMPLE done tag:%u result:%d", client->name, ps->tag, res); pw_work_queue_add(impl->work_queue, ps, 0, on_sample_done, client);