diff options
author | Trung Tran <trung.tran@ettus.com> | 2019-02-18 15:09:41 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-02-22 16:14:50 -0800 |
commit | 37b3e7f06b7a2b6e0fe127c013f9882a54e1d3cd (patch) | |
tree | f984c199f8425659c5cde5408dd4a373ae106ec9 /host | |
parent | 4dc8ea59bd1c054b674a6545194d0b901855dec4 (diff) | |
download | uhd-37b3e7f06b7a2b6e0fe127c013f9882a54e1d3cd.tar.gz uhd-37b3e7f06b7a2b6e0fe127c013f9882a54e1d3cd.tar.bz2 uhd-37b3e7f06b7a2b6e0fe127c013f9882a54e1d3cd.zip |
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<trung.tran@ettus.com>
Diffstat (limited to 'host')
-rw-r--r-- | host/include/uhd/rfnoc/node_ctrl_base.ipp | 5 |
1 files 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) : |