ladishd: don't create two vclients with same name

If the app first creates alsa (a2j) port, the created vclient is
not intrelinked because there is no jack client to interlink.
When the first jack port appears, because the jack client has
no interlinked client, a new vclient with same name was created.

This changeset implements a search by app uuid before new vclient
is created.
This commit is contained in:
Nedko Arnaudov 2010-12-02 05:40:21 +02:00
parent ff8348650a
commit 68049ee6cb
1 changed files with 34 additions and 30 deletions

View File

@ -748,6 +748,9 @@ port_appeared(
ASSERT(vclient != NULL);
}
else
{
vclient = ladish_graph_find_client_by_app(vgraph, app_uuid);
if (vclient == NULL)
{
log_info("creating new vclient");
if (!ladish_client_create(NULL, &vclient))
@ -771,6 +774,7 @@ port_appeared(
}
}
}
}
/********************/
/* add newly appeared port to the virtual graph */