summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-09-27 16:04:04 -0700
committerJosh Blum <josh@joshknows.com>2010-09-27 16:04:04 -0700
commitfd15965442d5a8805a4730022f8d500841f8448d (patch)
treef40b05334a00f5234926dff9f9ad20dc67bac0ef /host
parent2f62c39b7135728ed06faa06db46004323b1c70f (diff)
downloaduhd-fd15965442d5a8805a4730022f8d500841f8448d.tar.gz
uhd-fd15965442d5a8805a4730022f8d500841f8448d.tar.bz2
uhd-fd15965442d5a8805a4730022f8d500841f8448d.zip
usrp1: filter the discovery routine on the serial
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index 627180b11..80ea49e9d 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -96,7 +96,10 @@ static device_addrs_t usrp1_find(const device_addr_t &hint)
device_addr_t new_addr;
new_addr["type"] = "usrp1";
new_addr["serial"] = handle->get_serial();
- usrp1_addrs.push_back(new_addr);
+ //this is a found usrp1 when a hint serial is not specified or it matches
+ if (not hint.has_key("serial") or hint["serial"] == new_addr["serial"]){
+ usrp1_addrs.push_back(new_addr);
+ }
}
return usrp1_addrs;