client-node: make old driver nodes work

Bump the client-node version because we use the writefd differently now.
Support driver nodes using the old version somewhat. The stats will be
wrong but then again, we don't have any flatpak driver nodes that could
use an older version.
This commit is contained in:
Wim Taymans 2023-05-22 11:03:20 +02:00
parent 0135a1fc05
commit 7ffe64f7af
3 changed files with 9 additions and 5 deletions

View file

@ -1089,7 +1089,14 @@ static void node_on_data_fd_events(struct spa_source *source)
node->name, node->info.id, cmd - 1);
spa_log_trace_fp(impl->log, "%p: got complete %d", impl, status);
pw_context_driver_emit_complete(node->context, node);
if (impl->resource && impl->resource->version < 5) {
struct pw_node_activation *a = node->rt.activation;
int status = a->state[0].status;
spa_node_call_ready(&impl->callbacks, status);
} else {
pw_context_driver_emit_complete(node->context, node);
}
}
}