mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-29 21:37:54 -04:00
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:
parent
88b3d9525e
commit
b0163a44a6
1 changed files with 3 additions and 0 deletions
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "collect.h"
|
#include "collect.h"
|
||||||
|
#include "debug.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "manager.h"
|
#include "manager.h"
|
||||||
#include "message-handler.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);
|
int res = malloc_trim(0);
|
||||||
fprintf(response, "%d", res);
|
fprintf(response, "%d", res);
|
||||||
#endif
|
#endif
|
||||||
|
} else if (spa_streq(message, "pipewire-pulse:dump-state")) {
|
||||||
|
dump_state(client->impl, response);
|
||||||
} else {
|
} else {
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue