diff options
author | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-02-01 14:04:23 -0600 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-02-01 14:35:29 -0600 |
commit | ef30ed1743f470756eadab4067587caf0341be8e (patch) | |
tree | c9fe10619225f14b3e0cdc88adf197917d4f5069 /.github | |
parent | a4fc11e6ef08be2141f3cfea7c521aae0ba65634 (diff) | |
download | uhd-ef30ed1743f470756eadab4067587caf0341be8e.tar.gz uhd-ef30ed1743f470756eadab4067587caf0341be8e.tar.bz2 uhd-ef30ed1743f470756eadab4067587caf0341be8e.zip |
rfnoc: Fix _set_subdev_spec() helper function
In 716ed77, refactoring was performed to merge `set_tx_subdev_spec()`
and `set_rx_subdev_spec()` via the use of a shared helper function,
`_set_subdev_spec()`, which factors out differences in the two
directions by accepting lambda functions from the caller. However, there
were two bugs introduced in the refactoring:
- The channel map parameter, which is either `_rx_chans` or `_tx_chans`
based on direction, was passed by value and not reference, so changes
made by the function were not persisted in the member variables
maintained in the `multi_usrp_rfnoc` class.
- The connection removal loop checks for the presence of an SEP block on
an edge as its termination condition. In the pre-refactored code, the
direction determined whether the source or destination of the edge was
checked for the SEP. However, in the refactoring, the source of the edge
is checked for both TX and RX. While this works for the
`set_tx_subdev_spec()` call, it breaks the `set_rx_subdev_spec()` call.
This commit fixes the issue by adding another lambda parameter to the
`set_subdev_spec()` function, which puts the onus of the edge check on
the direction-specific code to ensure it is looking at the correct side
of the edge.
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions