aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/device.cpp')
-rw-r--r--host/lib/device.cpp13
1 files changed, 10 insertions, 3 deletions
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;
}