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.
This commit is contained in:
Barnabás Pőcze 2022-01-20 18:14:35 +01:00
parent 88b3d9525e
commit b0163a44a6

View file

@ -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;
}