client-node: use bound id from the proxy

Remove the obsolete node_id from the transport. We get this info
now from the proxy.
This commit is contained in:
Wim Taymans 2019-11-28 13:24:09 +01:00
parent fcd4ae3334
commit c9a54112e4
5 changed files with 21 additions and 16 deletions

View file

@ -606,9 +606,16 @@ static void on_node_proxy_destroy(void *data)
}
static void on_node_proxy_bound(void *data, uint32_t global_id)
{
struct client *client = data;
client->node_id = global_id;
}
static const struct pw_proxy_events proxy_events = {
PW_VERSION_PROXY_EVENTS,
.destroy = on_node_proxy_destroy,
.bound = on_node_proxy_bound,
};
static struct link *find_activation(struct pw_array *links, uint32_t node_id)
@ -1094,7 +1101,6 @@ static void clean_transport(struct client *c)
}
static int client_node_transport(void *object,
uint32_t node_id,
int readfd, int writefd,
uint32_t mem_id, uint32_t offset, uint32_t size)
{
@ -1102,8 +1108,6 @@ static int client_node_transport(void *object,
clean_transport(c);
c->node_id = node_id;
c->mem = pw_mempool_map_id(c->remote->pool, mem_id,
PW_MEMMAP_FLAG_READWRITE, offset, size, NULL);
if (c->mem == NULL) {