diff options
author | Josh Blum <josh@joshknows.com> | 2011-06-24 16:36:00 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-06-24 16:36:00 -0700 |
commit | 58679377fba07be56548874ed117a76eae79e846 (patch) | |
tree | df57847dd60d83a4ecc3cd74897d7ba9f0b000ab /host/lib | |
parent | adfa8d725fdb21234d2856cf78c0a0293a53465e (diff) | |
download | uhd-58679377fba07be56548874ed117a76eae79e846.tar.gz uhd-58679377fba07be56548874ed117a76eae79e846.tar.bz2 uhd-58679377fba07be56548874ed117a76eae79e846.zip |
b100: always init the serial number in find
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/b100/b100_impl.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp index db7c585d7..d8c5e72ce 100644 --- a/host/lib/usrp/b100/b100_impl.cpp +++ b/host/lib/usrp/b100/b100_impl.cpp @@ -97,6 +97,7 @@ static device_addrs_t b100_find(const device_addr_t &hint) BOOST_FOREACH(usb_device_handle::sptr handle, usb_device_handle::get_device_list(vid, pid)) { device_addr_t new_addr; new_addr["type"] = "b100"; + new_addr["serial"] = handle->get_serial(); //Attempt to read the name from the EEPROM and perform filtering. //This operation can throw due to compatibility mismatch. @@ -104,13 +105,11 @@ static device_addrs_t b100_find(const device_addr_t &hint) usb_control::sptr control = usb_control::make(handle); b100_iface::sptr iface = b100_iface::make(fx2_ctrl::make(control)); new_addr["name"] = iface->mb_eeprom["name"]; - new_addr["serial"] = handle->get_serial(); } catch(const uhd::exception &){ //set these values as empty string so the device may still be found //and the filter's below can still operate on the discovered device new_addr["name"] = ""; - new_addr["serial"] = ""; } //this is a found b100 when the hint serial and name match or blank |