diff --git a/lib/rfspace/rfspace_source_c.cc b/lib/rfspace/rfspace_source_c.cc index 7c1b0c6..7cba493 100644 --- a/lib/rfspace/rfspace_source_c.cc +++ b/lib/rfspace/rfspace_source_c.cc @@ -1124,7 +1124,7 @@ static std::string read_file(const char *filename) return contents; } - throw(errno); + return ""; } static std::vector < unit_t > discover_sdr_iq() @@ -1207,6 +1207,8 @@ static std::vector < unit_t > discover_sdr_iq() continue; std::string serial = read_file( (path + "/serial").c_str() ); + if ( serial.empty() ) + serial = ""; pos = serial.find('\n'); if ( pos != std::string::npos )