From b0163a44a6bfc102ee22555266a2a637029adb3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Thu, 20 Jan 2022 18:14:35 +0100 Subject: [PATCH] pulse-server: add message handler to dump state When the core object receives the 'internal:dump-state' message with any parameters, it will use the previously added debug facilities to dump the internal state of the server and send it back to the client. --- src/modules/module-protocol-pulse/message-handler.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/module-protocol-pulse/message-handler.c b/src/modules/module-protocol-pulse/message-handler.c index 07132c102..9274fef16 100644 --- a/src/modules/module-protocol-pulse/message-handler.c +++ b/src/modules/module-protocol-pulse/message-handler.c @@ -19,6 +19,7 @@ #include "client.h" #include "collect.h" +#include "debug.h" #include "log.h" #include "manager.h" #include "message-handler.h" @@ -114,6 +115,8 @@ static int core_object_message_handler(struct client *client, struct pw_manager_ int res = malloc_trim(0); fprintf(response, "%d", res); #endif + } else if (spa_streq(message, "pipewire-pulse:dump-state")) { + dump_state(client->impl, response); } else { return -ENOSYS; }