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-18 16:36:08 -0800 |
commit | ecd7408884898391d759411d0bc6dc932e487fa6 (patch) | |
tree | 04f6b6ed3e8bae6aa24237c3ce83008c458a45ca /host | |
parent | 7d71823feb6adb3ddd5fda36847c9957b240d5cc (diff) | |
download | uhd-ecd7408884898391d759411d0bc6dc932e487fa6.tar.gz uhd-ecd7408884898391d759411d0bc6dc932e487fa6.tar.bz2 uhd-ecd7408884898391d759411d0bc6dc932e487fa6.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) : |