pulse-server: pending-sample: rename ready to replied

Rename `pending_sample::ready` to `pending_sample::replied` because
it is set when a reply is sent, not when the ready signal comes.
This commit is contained in:
Barnabás Pőcze 2023-05-07 16:03:29 +02:00 committed by Wim Taymans
parent e37da42632
commit dd7c47bb3d
2 changed files with 3 additions and 4 deletions

View file

@ -33,8 +33,6 @@ static void sample_play_ready_reply(void *data, struct client *client, uint32_t
pw_log_info("[%s] PLAY_SAMPLE tag:%u index:%u", pw_log_info("[%s] PLAY_SAMPLE tag:%u index:%u",
client->name, ps->tag, index); client->name, ps->tag, index);
ps->ready = true;
reply = reply_new(client, ps->tag); reply = reply_new(client, ps->tag);
if (client->version >= 13) if (client->version >= 13)
message_put(reply, message_put(reply,
@ -42,6 +40,7 @@ static void sample_play_ready_reply(void *data, struct client *client, uint32_t
TAG_INVALID); TAG_INVALID);
client_queue_message(client, reply); client_queue_message(client, reply);
ps->replied = true;
if (ps->done) if (ps->done)
sample_play_finish(ps); sample_play_finish(ps);
@ -58,7 +57,7 @@ static void on_sample_done(void *obj, void *data, int res, uint32_t id)
{ {
struct pending_sample *ps = obj; struct pending_sample *ps = obj;
ps->done = true; ps->done = true;
if (ps->ready) if (ps->replied)
sample_play_finish(ps); sample_play_finish(ps);
} }

View file

@ -21,7 +21,7 @@ struct pending_sample {
struct sample_play *play; struct sample_play *play;
struct spa_hook listener; struct spa_hook listener;
uint32_t tag; uint32_t tag;
unsigned ready:1; unsigned replied:1;
unsigned done:1; unsigned done:1;
}; };