protocol-native: move compat_v2 to protocol

This commit is contained in:
Wim Taymans 2023-07-11 15:59:09 +02:00
parent 7d6fc0f544
commit 17bc9d520e
4 changed files with 12 additions and 8 deletions

View file

@ -23,6 +23,8 @@
#endif
#include <spa/pod/iter.h>
#include <spa/pod/parser.h>
#include <spa/pod/builder.h>
#include <spa/utils/result.h>
#include <spa/utils/string.h>
@ -1465,6 +1467,7 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
{
struct pw_context *context = pw_impl_module_get_context(module);
struct pw_protocol *this;
struct pw_impl_core *core = context->core;
struct protocol_data *d;
const struct pw_properties *props;
int res;
@ -1496,10 +1499,10 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
d->module = module;
props = pw_context_get_properties(context);
d->local = create_server(this, context->core, &props->dict);
d->local = create_server(this, core, &props->dict);
if (need_server(context, &props->dict)) {
if (impl_add_server(this, context->core, &props->dict) == NULL) {
if (impl_add_server(this, core, &props->dict) == NULL) {
res = -errno;
goto error_cleanup;
}