diff options
author | michael-west <michael.west@ettus.com> | 2020-07-07 13:37:25 -0700 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-08-04 15:41:07 -0500 |
commit | d7c64eb4b13670dbc5728f994e70dca60616af63 (patch) | |
tree | 706844126fe06450e8f262ef1b48dedbe14680de /host/tests | |
parent | 6d4c07d09ad54155df7ed374e7fbfebd9d40758b (diff) | |
download | uhd-d7c64eb4b13670dbc5728f994e70dca60616af63.tar.gz uhd-d7c64eb4b13670dbc5728f994e70dca60616af63.tar.bz2 uhd-d7c64eb4b13670dbc5728f994e70dca60616af63.zip |
RFNoC: Add xport disconnect callbacks
Transports were not disconnecting their links from the I/O service upon
destruction, leaving behind inaccessible send and recv links used by
nothing. This led to I/O errors after creating several transports.
Added callbacks to transports to automatically disconnect their links
from the I/O service when the transport is destroyed. Updated all
callers to supply a disconnect callback.
Signed-off-by: michael-west <michael.west@ettus.com>
Diffstat (limited to 'host/tests')
-rw-r--r-- | host/tests/streamer_benchmark.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/host/tests/streamer_benchmark.cpp b/host/tests/streamer_benchmark.cpp index 706ecee10..88dd9665b 100644 --- a/host/tests/streamer_benchmark.cpp +++ b/host/tests/streamer_benchmark.cpp @@ -302,7 +302,11 @@ static std::shared_ptr<rx_streamer_mock_link> make_rx_streamer_mock_link( pkt_factory, epids, send_link->get_num_send_frames(), - fc_params); + fc_params, + [io_srv = io_srv, recv_link, send_link]() { + io_srv->detach_recv_link(recv_link); + io_srv->detach_send_link(send_link); + }); streamer->connect_channel(0, std::move(xport)); return streamer; @@ -341,7 +345,11 @@ static std::shared_ptr<tx_streamer_mock_link> make_tx_streamer_mock_link( pkt_factory, epids, send_link->get_num_send_frames(), - fc_params); + fc_params, + [io_srv = io_srv, recv_link, send_link]() { + io_srv->detach_recv_link(recv_link); + io_srv->detach_send_link(send_link); + }); streamer->connect_channel(0, std::move(xport)); return streamer; |