pulse-server: use object serial as index

Use the lower 32 bits of the object serial as the index. When there is
an overflow, use an invalid index, which will probably result in a
protocol error.
This commit is contained in:
Wim Taymans 2022-01-17 12:48:31 +01:00
parent 1b9a2b6079
commit 1d03923a97
5 changed files with 28 additions and 4 deletions

View file

@ -54,6 +54,7 @@ struct selector {
struct pw_manager_object *select_object(struct pw_manager *m, struct selector *s);
uint32_t id_to_index(struct pw_manager *m, uint32_t id);
uint32_t index_to_id(struct pw_manager *m, uint32_t index);
void select_best(struct selector *s, struct pw_manager_object *o);
/* ========================================================================== */