Changeset 8aebce6821ae5d0266dcbc3de61ad34fe83e39e3
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r79c75fd0
|
r8aebce6
|
|
| 1126 | 1126 | uuid_t vclient_uuid; |
| 1127 | 1127 | ladish_client_handle vclient; |
| 1128 | | bool is_empty; |
| 1129 | 1128 | uuid_t jclient_uuid; |
| 1130 | | bool is_a2j; |
| 1131 | 1129 | |
| 1132 | 1130 | //ladish_graph_dump(g_studio.jack_graph); |
| … |
… |
|
| 1146 | 1144 | |
| 1147 | 1145 | 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 */ |
| 1150 | 1147 | |
| 1151 | 1148 | vgraph = ladish_client_get_vgraph(jclient); |
| … |
… |
|
| 1164 | 1161 | } |
| 1165 | 1162 | |
| 1166 | | if (is_a2j) |
| 1167 | | { |
| 1168 | | /* The a2j jclient has no interlinked vclient */ |
| 1169 | | return true; |
| 1170 | | } |
| 1171 | | |
| 1172 | 1163 | if (!ladish_client_get_interlink(jclient, vclient_uuid)) |
| 1173 | 1164 | { |
| 1174 | | if (is_empty) |
| | 1165 | if (ladish_graph_client_is_empty(jack_graph, jclient)) |
| 1175 | 1166 | { |
| 1176 | 1167 | log_info("jack client of app '%s' has no interlinked vgraph client and no ports", app_name); |
| … |
… |
|
| 1274 | 1265 | bool is_empty; |
| 1275 | 1266 | uuid_t jclient_uuid; |
| 1276 | | bool is_a2j; |
| 1277 | 1267 | struct app_remove_context ctx; |
| 1278 | 1268 | |
| … |
… |
|
| 1292 | 1282 | |
| 1293 | 1283 | 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 */ |
| 1296 | 1285 | |
| 1297 | 1286 | vgraph = ladish_client_get_vgraph(jclient); |
| … |
… |
|
| 1304 | 1293 | //ladish_graph_dump(vgraph); |
| 1305 | 1294 | |
| | 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 | |
| 1306 | 1300 | ladish_graph_remove_client(jack_graph, jclient); |
| 1307 | | |
| 1308 | | if (is_a2j) |
| 1309 | | { |
| 1310 | | /* The a2j jclient has no interlinked vclient */ |
| 1311 | | return; |
| 1312 | | } |
| 1313 | 1301 | |
| 1314 | 1302 | if (!ladish_client_get_interlink(jclient, vclient_uuid)) |