diff options
| author | Nicholas Corgan <nick.corgan@ettus.com> | 2014-03-17 06:45:33 -0700 | 
|---|---|---|
| committer | Nicholas Corgan <nick.corgan@ettus.com> | 2014-03-17 06:45:33 -0700 | 
| commit | 5670b71cedbc51bc4d4d3ddad9c06e3d1c71b36c (patch) | |
| tree | bf955f9e07236800297f8c0730ea30e204cd8310 | |
| parent | 140490649d0fd6fb5eee7109c02c35026a47b60c (diff) | |
| parent | fee96fbf99923878a755ef980b4f19fea0d57f8e (diff) | |
| download | uhd-5670b71cedbc51bc4d4d3ddad9c06e3d1c71b36c.tar.gz uhd-5670b71cedbc51bc4d4d3ddad9c06e3d1c71b36c.tar.bz2 uhd-5670b71cedbc51bc4d4d3ddad9c06e3d1c71b36c.zip  | |
Merge branch 'maint'
| -rw-r--r-- | host/lib/transport/libusb1_base.cpp | 10 | 
1 files changed, 9 insertions, 1 deletions
diff --git a/host/lib/transport/libusb1_base.cpp b/host/lib/transport/libusb1_base.cpp index 8bd0f4354..23117f128 100644 --- a/host/lib/transport/libusb1_base.cpp +++ b/host/lib/transport/libusb1_base.cpp @@ -21,6 +21,7 @@  #include <uhd/utils/log.hpp>  #include <uhd/utils/tasks.hpp>  #include <uhd/types/dict.hpp> +#include <uhd/types/serial.hpp>  #include <boost/weak_ptr.hpp>  #include <boost/thread/mutex.hpp>  #include <boost/foreach.hpp> @@ -184,7 +185,14 @@ public:          );          if (ret < 0) return ""; //on error, just return empty string -        return std::string((char *)buff, ret); +        std::string string_descriptor((char *)buff, ret); +        byte_vector_t string_vec(string_descriptor.begin(), string_descriptor.end()); +        std::string out; +        BOOST_FOREACH(boost::uint8_t byte, string_vec){ +            if (byte < 32 or byte > 127) return out; +            out += byte; +        } +        return out;      }  private:  | 
