client-node: keep target fd up to date

Keep the target and source fd in sync when we get the new fd from the
server in remote-node.

This makes it possible to refactor some things and only schedule nodes
by triggering the target.
This commit is contained in:
Wim Taymans 2023-11-28 16:20:39 +01:00
parent be17edbcfd
commit b9e5dde4ac
2 changed files with 21 additions and 29 deletions

View file

@ -216,8 +216,8 @@ static int client_node_transport(void *_data,
proxy, readfd, writefd, data->remote_id, data->activation->ptr);
data->rtwritefd = writefd;
spa_system_close(data->data_system, node->source.fd);
node->source.fd = readfd;
spa_system_close(node->data_system, node->source.fd);
node->rt.target.fd = node->source.fd = readfd;
data->have_transport = true;