diff options
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r-- | host/lib/usrp/usrp1/usrp1_impl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp index e40dd001d..ef8ae950d 100644 --- a/host/lib/usrp/usrp1/usrp1_impl.cpp +++ b/host/lib/usrp/usrp1/usrp1_impl.cpp @@ -81,6 +81,7 @@ static device_addrs_t usrp1_find(const device_addr_t &hint) // This requirement is a courtesy of libusb1.0 on windows. //find the usrps and load firmware + size_t found = 0; BOOST_FOREACH(usb_device_handle::sptr handle, usb_device_handle::get_device_list(vid, pid)) { //extract the firmware path for the USRP1 std::string usrp1_fw_image; @@ -101,6 +102,7 @@ static device_addrs_t usrp1_find(const device_addr_t &hint) catch(const uhd::exception &){continue;} //ignore claimed fx2_ctrl::make(control)->usrp_load_firmware(usrp1_fw_image); + found++; } //get descriptors again with serial number, but using the initialized VID/PID now since we have firmware @@ -110,7 +112,7 @@ static device_addrs_t usrp1_find(const device_addr_t &hint) const boost::system_time timeout_time = boost::get_system_time() + REENUMERATION_TIMEOUT_MS; //search for the device until found or timeout - while (boost::get_system_time() < timeout_time and usrp1_addrs.empty()) + while (boost::get_system_time() < timeout_time and usrp1_addrs.empty() and found != 0) { BOOST_FOREACH(usb_device_handle::sptr handle, usb_device_handle::get_device_list(vid, pid)) { |