mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
pulse-server: pass FILE to message handlers
Use `open_memstream()` to create a FILE stream and pass that to message handlers to store their response. This allows the `open_memstream()` calls and related error handling to be removed from the message handlers.
This commit is contained in:
parent
649b33c73f
commit
4e69507b18
3 changed files with 55 additions and 57 deletions
|
|
@ -9,6 +9,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <spa/utils/defs.h>
|
||||
#include <spa/pod/pod.h>
|
||||
|
||||
|
|
@ -69,7 +71,7 @@ struct pw_manager_object {
|
|||
struct pw_proxy *proxy;
|
||||
char *message_object_path;
|
||||
int (*message_handler)(struct pw_manager *m, struct pw_manager_object *o,
|
||||
const char *message, const char *params, char **response);
|
||||
const char *message, const char *params, FILE *response);
|
||||
|
||||
void *info;
|
||||
struct spa_param_info *params;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue