From cca10287170e8ad50740791e7cbe715b642c2a87 Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Fri, 10 Oct 2014 17:24:40 -0700 Subject: x300,nirio: Added support for NI-RIO 14.0 - Split niriok_proxy interfaces to support NI-RIO <=13.0 and >=14.0 kernel interfaces - Fixed multi-session race conditions by synchronizing niriok_proxy access - Fixed bug switching from NI LV-FPGA access to UHD access by changing how devices are hashed into a reservation table - Fixed calculation of FRAC values for CBX and SBX LO tuning by rounding instead of truncating - Fixed bug that was not setting two MSBs for band select configuration of CBX LO - Submitting on behalf of Patrick Sisterhen, Matthew Crymble --- host/lib/device.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'host/lib/device.cpp') diff --git a/host/lib/device.cpp b/host/lib/device.cpp index 453781510..006ea6ec8 100644 --- a/host/lib/device.cpp +++ b/host/lib/device.cpp @@ -47,9 +47,16 @@ static size_t hash_device_addr( ){ //combine the hashes of sorted keys/value pairs size_t hash = 0; - BOOST_FOREACH(const std::string &key, uhd::sorted(dev_addr.keys())){ - boost::hash_combine(hash, key); - boost::hash_combine(hash, dev_addr[key]); + + if(dev_addr.has_key("resource")) { + boost::hash_combine(hash, "resource"); + boost::hash_combine(hash, dev_addr["resource"]); + } + else { + BOOST_FOREACH(const std::string &key, uhd::sorted(dev_addr.keys())){ + boost::hash_combine(hash, key); + boost::hash_combine(hash, dev_addr[key]); + } } return hash; } -- cgit v1.2.3