Changeset 8aebce6821ae5d0266dcbc3de61ad34fe83e39e3

Show
Ignore:
Timestamp:
11/07/10 23:43:45 (3 years ago)
Author:
Nedko Arnaudov <nedko@…>
Children:
6c2201b933ebc1d6c4049a3138d2e46aae3e56d7
Parents:
eb866bf6e8302d2fc26ac8c490d28ba9adc6bd67
git-author:
Nedko Arnaudov <nedko@arnaudov.name> / 2010-11-07T23:43:36Z+0200
git-committer:
Nedko Arnaudov <nedko@arnaudov.name> / 2010-11-07T23:43:45Z+0200
Message:

ladishd: remove special a2j handling in remove/is_hidden[_app] virtualizer functions

a2j client has not app associated and thus should never be returned by ladish_graph_find_client_by_app()
This was somewhat possible in past, when the client was searched by name and not by uuid.

Also is_empty var is removed for ladish_graph_find_client_by_app(). For ladish_virtualizer_remove_app(),
the is_empty var is kept, because ladish_graph_client_is_empty() cannot be called after the client is removed
from the jack graph.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • daemon/virtualizer.c

    r79c75fd0 r8aebce6  
    11261126  uuid_t vclient_uuid; 
    11271127  ladish_client_handle vclient; 
    1128   bool is_empty; 
    11291128  uuid_t jclient_uuid; 
    1130   bool is_a2j; 
    11311129 
    11321130  //ladish_graph_dump(g_studio.jack_graph); 
     
    11461144 
    11471145  ladish_client_get_uuid(jclient, jclient_uuid); 
    1148   is_a2j = uuid_compare(jclient_uuid, g_a2j_uuid) == 0; 
    1149   is_empty = ladish_graph_client_is_empty(jack_graph, jclient); 
     1146  ASSERT(uuid_compare(jclient_uuid, g_a2j_uuid) != 0); /* a2j client has no app associated */ 
    11501147 
    11511148  vgraph = ladish_client_get_vgraph(jclient); 
     
    11641161  } 
    11651162 
    1166   if (is_a2j) 
    1167   { 
    1168     /* The a2j jclient has no interlinked vclient */ 
    1169     return true; 
    1170   } 
    1171  
    11721163  if (!ladish_client_get_interlink(jclient, vclient_uuid)) 
    11731164  { 
    1174     if (is_empty) 
     1165    if (ladish_graph_client_is_empty(jack_graph, jclient)) 
    11751166    { 
    11761167      log_info("jack client of app '%s' has no interlinked vgraph client and no ports", app_name); 
     
    12741265  bool is_empty; 
    12751266  uuid_t jclient_uuid; 
    1276   bool is_a2j; 
    12771267  struct app_remove_context ctx; 
    12781268 
     
    12921282 
    12931283  ladish_client_get_uuid(jclient, jclient_uuid); 
    1294   is_a2j = uuid_compare(jclient_uuid, g_a2j_uuid) == 0; 
    1295   is_empty = ladish_graph_client_is_empty(jack_graph, jclient); 
     1284  ASSERT(uuid_compare(jclient_uuid, g_a2j_uuid) != 0); /* a2j client has no app associated */ 
    12961285 
    12971286  vgraph = ladish_client_get_vgraph(jclient); 
     
    13041293  //ladish_graph_dump(vgraph); 
    13051294 
     1295  /* check whether the client is empty because this cannot 
     1296     be checked later because the client was removed 
     1297     (see where is_empty is used) */ 
     1298  is_empty = ladish_graph_client_is_empty(jack_graph, jclient); 
     1299 
    13061300  ladish_graph_remove_client(jack_graph, jclient); 
    1307  
    1308   if (is_a2j) 
    1309   { 
    1310     /* The a2j jclient has no interlinked vclient */ 
    1311     return; 
    1312   } 
    13131301 
    13141302  if (!ladish_client_get_interlink(jclient, vclient_uuid))