pa_assert_se (router = u->router);
pa_assert_se (nodeset = u->nodeset);
- /* do we have a routing group associated with this node ? It may have a custom effect */
- if (node->direction == agl_input)
- rtg = pa_hashmap_get (router->rtgroups.input, agl_node_type_str (node->type));
- else
- rtg = pa_hashmap_get (router->rtgroups.output, agl_node_type_str (node->type));
+ rtg = agl_router_get_rtgroup_from_class(u, node->type, 0, node->direction);
/* now let us compare priorities, and apply effect if needed */
/* "new" case */
/* we try to discover node routing group from the configuration, "Phone" for instance,
* see defaults in "config.c. Otherwise we just say NULL, a.k.a. default */
+ rtg = agl_router_get_rtgroup_from_class(u, node->type, 0, node->direction);
+
if (node->direction == agl_input) {
- rtg = pa_hashmap_get (router->rtgroups.input, agl_node_type_str (node->type));
if (rtg)
implement_default_route (u, node, rtg->node, agl_utils_new_stamp ());
else
implement_default_route (u, node, NULL, agl_utils_new_stamp ());
} else {
- rtg = pa_hashmap_get (router->rtgroups.output, agl_node_type_str (node->type));
if (rtg)
implement_default_route (u, rtg->node, node, agl_utils_new_stamp ());
else
uint32_t stamp)
{
if (start->direction == agl_input)
- agl_switch_setup_link (u, start, end, false);
+ agl_switch_setup_link (u, start, end);
else
- agl_switch_setup_link (u, end, start, false);
+ agl_switch_setup_link (u, end, start);
}
agl_node *find_default_route (struct userdata *u, agl_node *start, uint32_t stamp)