From 537598726bfdea24538b1cc324eb8efcfa6e2cde Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sat, 27 Oct 2018 17:10:01 +0100 Subject: [PATCH] protocol-native: first bind, then register First let the client bind to the core, then register the client. This way, the client is ready to receive methods on the core. --- src/modules/module-protocol-native.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/module-protocol-native.c b/src/modules/module-protocol-native.c index d485edd70..3d8c67b74 100644 --- a/src/modules/module-protocol-native.c +++ b/src/modules/module-protocol-native.c @@ -290,10 +290,11 @@ static struct pw_client *client_new(struct server *s, int fd) spa_list_append(&s->this.client_list, &client->protocol_link); pw_client_add_listener(client, &this->client_listener, &client_events, this); - pw_client_register(client, client, pw_module_get_global(pd->module), NULL); pw_global_bind(pw_core_get_global(core), client, PW_PERM_RWX, PW_VERSION_CORE, 0); + pw_client_register(client, client, pw_module_get_global(pd->module), NULL); + return client; no_connection: