diff options
| author | Grant Meyerhoff <grant.meyerhoff@ni.com> | 2020-12-10 16:57:29 -0600 | 
|---|---|---|
| committer | michael-west <michael.west@ettus.com> | 2020-12-21 09:33:17 -0800 | 
| commit | 0b33d3a4b7c27a69f5943d595a8f312bd1750379 (patch) | |
| tree | 1ce5ab0bc853d28cedf3639552e257eb63b56acb | |
| parent | 8467add1ed43f23ca8cb680ec6c82ca15250a216 (diff) | |
| download | uhd-0b33d3a4b7c27a69f5943d595a8f312bd1750379.tar.gz uhd-0b33d3a4b7c27a69f5943d595a8f312bd1750379.tar.bz2 uhd-0b33d3a4b7c27a69f5943d595a8f312bd1750379.zip  | |
uhd: throw error if edge list is empty
| -rw-r--r-- | host/lib/usrp/multi_usrp_rfnoc.cpp | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp_rfnoc.cpp b/host/lib/usrp/multi_usrp_rfnoc.cpp index 0bef5cfcb..b9e8f0a1f 100644 --- a/host/lib/usrp/multi_usrp_rfnoc.cpp +++ b/host/lib/usrp/multi_usrp_rfnoc.cpp @@ -305,6 +305,10 @@ public:          for (size_t strm_port = 0; strm_port < args.channels.size(); ++strm_port) {              auto rx_channel = args.channels.at(strm_port);              auto rx_chain   = _get_rx_chan(rx_channel); +            if (rx_chain.edge_list.empty()) { +                throw uhd::runtime_error("Graph edge list is empty for rx channel " +                                         + std::to_string(rx_channel)); +            }              UHD_LOG_TRACE("MULTI_USRP",                  "Connecting " << rx_chain.edge_list.back().src_blockid << ":"                                << rx_chain.edge_list.back().src_port @@ -386,6 +390,10 @@ public:          for (size_t strm_port = 0; strm_port < args.channels.size(); ++strm_port) {              auto tx_channel = args.channels.at(strm_port);              auto tx_chain   = _get_tx_chan(tx_channel); +            if (tx_chain.edge_list.empty()) { +                throw uhd::runtime_error("Graph edge list is empty for tx channel " +                                         + std::to_string(tx_channel)); +            }              UHD_LOG_TRACE("MULTI_USRP",                  "Connecting TxStreamer:" << strm_port << " -> "                                           << tx_chain.edge_list.back().dst_blockid << ":"  | 
