core: only keep the first core resource

The resource with id 0 is always the core resource. If the client
later binds to the core again, don't override the core resource.
This commit is contained in:
Wim Taymans 2017-09-15 15:02:15 +02:00
parent 389781e3d5
commit 63723cd15e

View file

@ -376,8 +376,10 @@ core_bind_func(struct pw_global *global,
pw_resource_set_implementation(resource, &core_methods, resource);
spa_list_insert(this->resource_list.prev, &resource->link);
client->core_resource = resource;
spa_list_append(&this->resource_list, &resource->link);
if (resource->id == 0)
client->core_resource = resource;
pw_log_debug("core %p: bound to %d", this, resource->id);