pulse-server: check all pending streams

Check all pending streams to see if the new link completes their
creation.

It is possible that the link linked 2 pending streams and then we
want to complete them both.
This commit is contained in:
Wim Taymans 2022-06-03 15:50:54 +02:00
parent 258a203d74
commit 1252927d73

View file

@ -826,19 +826,17 @@ static void manager_added(void *data, struct pw_manager_object *o)
}
if (spa_streq(o->type, PW_TYPE_INTERFACE_Link)) {
struct stream *s;
struct stream *s, *t;
struct pw_manager_object *peer = NULL;
spa_list_for_each(s, &client->pending_streams, link) {
spa_list_for_each_safe(s, t, &client->pending_streams, link) {
peer = find_peer_for_link(manager, o, s->id, s->direction);
if (peer)
break;
}
if (peer) {
reply_create_stream(s, peer);
spa_list_remove(&s->link);
s->pending = false;
}
}
}
send_object_event(client, o, SUBSCRIPTION_EVENT_NEW);