daemon: When saving studio, don't save non-studio jack clients
This commit is contained in:
parent
229c4f2c0d
commit
c291a60da6
|
@ -117,7 +117,7 @@ found:
|
|||
if (cmd_ptr->command.state == LADISH_COMMAND_STATE_PENDING)
|
||||
{
|
||||
ladish_graph_clear_persist(graph);
|
||||
ladish_graph_iterate_nodes(ladish_room_get_graph(room), false, room, NULL, uninit_room_ports, NULL);
|
||||
ladish_graph_iterate_nodes(ladish_room_get_graph(room), false, NULL, room, NULL, uninit_room_ports, NULL);
|
||||
ladish_app_supervisor_stop(supervisor);
|
||||
|
||||
cmd_ptr->command.state = LADISH_COMMAND_STATE_WAITING;
|
||||
|
|
|
@ -860,7 +860,7 @@ interlink_client(
|
|||
|
||||
static void interlink_clients(void)
|
||||
{
|
||||
ladish_graph_iterate_nodes(g_studio.jack_graph, false, NULL, interlink_client, NULL, NULL);
|
||||
ladish_graph_iterate_nodes(g_studio.jack_graph, false, NULL, NULL, interlink_client, NULL, NULL);
|
||||
}
|
||||
|
||||
#define cmd_ptr ((struct ladish_command_load_studio *)command_context)
|
||||
|
|
|
@ -835,7 +835,7 @@ static bool run(void * command_context)
|
|||
|
||||
save_context.fd = fd;
|
||||
|
||||
if (!ladish_graph_iterate_nodes(g_studio.jack_graph, true, &save_context, save_jack_client_begin, save_jack_port, save_jack_client_end))
|
||||
if (!ladish_graph_iterate_nodes(g_studio.jack_graph, true, g_studio.studio_graph, &save_context, save_jack_client_begin, save_jack_port, save_jack_client_end))
|
||||
{
|
||||
log_error("ladish_graph_iterate_nodes() failed");
|
||||
goto close;
|
||||
|
@ -856,7 +856,7 @@ static bool run(void * command_context)
|
|||
goto close;
|
||||
}
|
||||
|
||||
if (!ladish_graph_iterate_nodes(g_studio.studio_graph, true, &save_context, save_studio_client_begin, save_studio_port, save_studio_client_end))
|
||||
if (!ladish_graph_iterate_nodes(g_studio.studio_graph, true, NULL, &save_context, save_studio_client_begin, save_studio_port, save_studio_client_end))
|
||||
{
|
||||
log_error("ladish_graph_iterate_nodes() failed");
|
||||
goto close;
|
||||
|
|
|
@ -2029,6 +2029,7 @@ bool
|
|||
ladish_graph_iterate_nodes(
|
||||
ladish_graph_handle graph_handle,
|
||||
bool skip_hidden,
|
||||
void * vgraph_filter,
|
||||
void * callback_context,
|
||||
bool
|
||||
(* client_begin_callback)(
|
||||
|
@ -2058,6 +2059,7 @@ ladish_graph_iterate_nodes(
|
|||
void * client_context;
|
||||
struct list_head * port_node_ptr;
|
||||
struct ladish_graph_port * port_ptr;
|
||||
void * vgraph;
|
||||
|
||||
list_for_each(client_node_ptr, &graph_ptr->clients)
|
||||
{
|
||||
|
@ -2068,6 +2070,15 @@ ladish_graph_iterate_nodes(
|
|||
continue;
|
||||
}
|
||||
|
||||
if (vgraph_filter != NULL)
|
||||
{
|
||||
vgraph = ladish_client_get_vgraph(client_ptr->client);
|
||||
if (vgraph != vgraph_filter)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (client_begin_callback != NULL)
|
||||
{
|
||||
if (!client_begin_callback(callback_context, client_ptr->client, client_ptr->name, &client_context))
|
||||
|
@ -2334,6 +2345,7 @@ bool ladish_graph_copy(ladish_graph_handle src, ladish_graph_handle dest, bool s
|
|||
return ladish_graph_iterate_nodes(
|
||||
src,
|
||||
skip_hidden,
|
||||
NULL,
|
||||
dest,
|
||||
ladish_graph_copy_client_begin_callback,
|
||||
ladish_graph_copy_port_callback,
|
||||
|
|
|
@ -166,6 +166,7 @@ bool
|
|||
ladish_graph_iterate_nodes(
|
||||
ladish_graph_handle graph_handle,
|
||||
bool skip_hidden,
|
||||
void * vgraph_filter,
|
||||
void * callback_context,
|
||||
bool
|
||||
(* client_begin_callback)(
|
||||
|
|
|
@ -303,6 +303,7 @@ ladish_room_iterate_link_ports(
|
|||
return ladish_graph_iterate_nodes(
|
||||
room_ptr->graph,
|
||||
false,
|
||||
NULL,
|
||||
&context,
|
||||
ladish_room_iterate_link_ports_client_callback,
|
||||
ladish_room_iterate_link_ports_port_callback,
|
||||
|
|
Loading…
Reference in New Issue