From 37b3e7f06b7a2b6e0fe127c013f9882a54e1d3cd Mon Sep 17 00:00:00 2001 From: Trung Tran Date: Mon, 18 Feb 2019 15:09:41 -0800 Subject: node_ctrl_base: add check valid num_input_ports A node is not a block, it doesn't use any block definition to populate the number of input and output ports. This is equivalent to it have undefined number of input and output ports. The _find_child_node function relies on node input and output port size. When port size is not defined we should not follow the active channel; instead, we need to greedily to find all child node. Without this change graph_search_test will fail. Signed-off-by: Trung Tran --- host/include/uhd/rfnoc/node_ctrl_base.ipp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/host/include/uhd/rfnoc/node_ctrl_base.ipp b/host/include/uhd/rfnoc/node_ctrl_base.ipp index 0a9553b6d..80dadfcf9 100644 --- a/host/include/uhd/rfnoc/node_ctrl_base.ipp +++ b/host/include/uhd/rfnoc/node_ctrl_base.ipp @@ -85,8 +85,9 @@ namespace uhd { // map each input port directly to the same output // port. This limits the graph traversal to prevent // finding nodes that are not part of this chain. - if (one_next_node->_num_input_ports == - one_next_node->_num_output_ports) + if (one_next_node->_num_input_ports + and (one_next_node->_num_input_ports == + one_next_node->_num_output_ports)) { next_port = (downstream ? node->get_downstream_port(connected_port) : -- cgit v1.2.3