aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorAndrew Lynch <andrew.lynch@ni.com>2020-01-14 16:08:46 -0600
committeratrnati <54334261+atrnati@users.noreply.github.com>2020-02-26 08:05:54 -0600
commit2362b3b3fbfd642c92b782771863fa2cd8ef23b0 (patch)
tree2c9b6d573020b351890b174cca4ae8a664b95e8d /host
parent3822b21b6e8824ec8f652ce5091294b30bde1c5c (diff)
downloaduhd-2362b3b3fbfd642c92b782771863fa2cd8ef23b0.tar.gz
uhd-2362b3b3fbfd642c92b782771863fa2cd8ef23b0.tar.bz2
uhd-2362b3b3fbfd642c92b782771863fa2cd8ef23b0.zip
device: read in preferences file before discovery
Diffstat (limited to 'host')
-rw-r--r--host/lib/device.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/host/lib/device.cpp b/host/lib/device.cpp
index 1749f4a60..752e70288 100644
--- a/host/lib/device.cpp
+++ b/host/lib/device.cpp
@@ -130,11 +130,13 @@ device::sptr device::make(const device_addr_t &hint, device_filter_t filter, siz
typedef std::tuple<device_addr_t, make_t> dev_addr_make_t;
std::vector<dev_addr_make_t> dev_addr_makers;
+ device_addr_t hint_with_prefs = prefs::get_usrp_args(hint);
+ UHD_LOGGER_DEBUG("UHD") << "Looking for device with hint: " << hint_with_prefs.to_string();
for(const dev_fcn_reg_t &fcn: get_dev_fcn_regs()){
try{
if(filter == ANY or std::get<2>(fcn) == filter){
- for(device_addr_t dev_addr: std::get<0>(fcn)(hint)){
+ for (device_addr_t dev_addr : std::get<0>(fcn)(hint_with_prefs)) {
//append the discovered address and its factory function
dev_addr_makers.push_back(dev_addr_make_t(dev_addr, std::get<1>(fcn)));
}