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:
Barnabás Pőcze 2022-01-20 18:02:12 +01:00 committed by Wim Taymans
parent 649b33c73f
commit 4e69507b18
3 changed files with 55 additions and 57 deletions

View file

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