jack: we don't need a completed link in jack_port_connected

Return true from jack_port_connected() right after jack_connect(), there
is no reason to wait for the completed state of the link.

See #2638
This commit is contained in:
Wim Taymans 2023-04-24 12:57:36 +02:00
parent b87f7251d8
commit 5a65d67f3a

View file

@ -4799,8 +4799,6 @@ int jack_port_connected (const jack_port_t *port)
spa_list_for_each(l, &c->context.objects, link) { spa_list_for_each(l, &c->context.objects, link) {
if (l->type != INTERFACE_Link || l->removed) if (l->type != INTERFACE_Link || l->removed)
continue; continue;
if (!l->port_link.is_complete)
continue;
if (l->port_link.src_serial == o->serial || if (l->port_link.src_serial == o->serial ||
l->port_link.dst_serial == o->serial) l->port_link.dst_serial == o->serial)
res++; res++;
@ -4842,8 +4840,7 @@ int jack_port_connected_to (const jack_port_t *port,
p = o; p = o;
o = l; o = l;
} }
if ((l = find_link(c, o->id, p->id)) != NULL && if ((l = find_link(c, o->id, p->id)) != NULL)
l->port_link.is_complete)
res = 1; res = 1;
exit: exit: