From 92abc7b7ad93934fa93318f27cc2074d2769b2ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Thu, 30 Dec 2021 21:24:06 +0100 Subject: [PATCH] pulse-server: store whether the client has been authenticated Add a new flag to the client struct which saves whether or not the client has successfully authenticated itself. --- src/modules/module-protocol-pulse/client.h | 1 + src/modules/module-protocol-pulse/pulse-server.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/modules/module-protocol-pulse/client.h b/src/modules/module-protocol-pulse/client.h index 616980950..7ab5c26fc 100644 --- a/src/modules/module-protocol-pulse/client.h +++ b/src/modules/module-protocol-pulse/client.h @@ -97,6 +97,7 @@ struct client { unsigned int disconnect:1; unsigned int disconnecting:1; unsigned int new_msg_since_last_flush:1; + unsigned int authenticated:1; struct pw_manager_object *prev_default_sink; struct pw_manager_object *prev_default_source; diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 0a12d5b65..6eb6d98d5 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -149,6 +149,7 @@ static int do_command_auth(struct client *client, uint32_t command, uint32_t tag version &= PROTOCOL_VERSION_MASK; client->version = version; + client->authenticated = true; pw_log_info("client:%p AUTH tag:%u version:%d", client, tag, version);