aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/sink_impl.cc22
-rw-r--r--lib/source_impl.cc46
2 files changed, 34 insertions, 34 deletions
diff --git a/lib/sink_impl.cc b/lib/sink_impl.cc
index 3f4db4b..6b8f1bd 100644
--- a/lib/sink_impl.cc
+++ b/lib/sink_impl.cc
@@ -104,25 +104,25 @@ sink_impl::sink_impl( const std::string &args )
#ifdef WORKAROUND_GR_HIER_BLOCK2_BUG
try {
#endif
- std::vector< std::string > dev_list;
+ if ( ! device_specified ) {
+ std::vector< std::string > dev_list;
#ifdef ENABLE_UHD
- BOOST_FOREACH( std::string dev, uhd_sink_c::get_devices() )
- dev_list.push_back( dev );
+ BOOST_FOREACH( std::string dev, uhd_sink_c::get_devices() )
+ dev_list.push_back( dev );
#endif
#ifdef ENABLE_BLADERF
- BOOST_FOREACH( std::string dev, bladerf_sink_c::get_devices() )
- dev_list.push_back( dev );
+ BOOST_FOREACH( std::string dev, bladerf_sink_c::get_devices() )
+ dev_list.push_back( dev );
#endif
#ifdef ENABLE_HACKRF
- BOOST_FOREACH( std::string dev, hackrf_sink_c::get_devices() )
- dev_list.push_back( dev );
+ BOOST_FOREACH( std::string dev, hackrf_sink_c::get_devices() )
+ dev_list.push_back( dev );
#endif
-// std::cerr << std::endl;
-// BOOST_FOREACH( std::string dev, dev_list )
-// std::cerr << "'" << dev << "'" << std::endl;
+// std::cerr << std::endl;
+// BOOST_FOREACH( std::string dev, dev_list )
+// std::cerr << "'" << dev << "'" << std::endl;
- if (!device_specified) {
if ( dev_list.size() )
arg_list.push_back( dev_list.front() );
else
diff --git a/lib/source_impl.cc b/lib/source_impl.cc
index 1e9af47..68a8423 100644
--- a/lib/source_impl.cc
+++ b/lib/source_impl.cc
@@ -168,49 +168,49 @@ source_impl::source_impl( const std::string &args )
#ifdef WORKAROUND_GR_HIER_BLOCK2_BUG
try {
#endif
- std::vector< std::string > dev_list;
+ if ( ! device_specified ) {
+ std::vector< std::string > dev_list;
#ifdef ENABLE_OSMOSDR
- BOOST_FOREACH( std::string dev, osmosdr_src_c::get_devices() )
- dev_list.push_back( dev );
+ BOOST_FOREACH( std::string dev, osmosdr_src_c::get_devices() )
+ dev_list.push_back( dev );
#endif
#ifdef ENABLE_FCD
- BOOST_FOREACH( std::string dev, fcd_source_c::get_devices() )
- dev_list.push_back( dev );
+ BOOST_FOREACH( std::string dev, fcd_source_c::get_devices() )
+ dev_list.push_back( dev );
#endif
#ifdef ENABLE_RTL
- BOOST_FOREACH( std::string dev, rtl_source_c::get_devices() )
- dev_list.push_back( dev );
+ BOOST_FOREACH( std::string dev, rtl_source_c::get_devices() )
+ dev_list.push_back( dev );
#endif
#ifdef ENABLE_UHD
- BOOST_FOREACH( std::string dev, uhd_source_c::get_devices() )
- dev_list.push_back( dev );
+ BOOST_FOREACH( std::string dev, uhd_source_c::get_devices() )
+ dev_list.push_back( dev );
#endif
#ifdef ENABLE_MIRI
- BOOST_FOREACH( std::string dev, miri_source_c::get_devices() )
- dev_list.push_back( dev );
+ BOOST_FOREACH( std::string dev, miri_source_c::get_devices() )
+ dev_list.push_back( dev );
#endif
#ifdef ENABLE_BLADERF
- BOOST_FOREACH( std::string dev, bladerf_source_c::get_devices() )
- dev_list.push_back( dev );
+ BOOST_FOREACH( std::string dev, bladerf_source_c::get_devices() )
+ dev_list.push_back( dev );
#endif
#ifdef ENABLE_RFSPACE
- BOOST_FOREACH( std::string dev, rfspace_source_c::get_devices() )
- dev_list.push_back( dev );
+ BOOST_FOREACH( std::string dev, rfspace_source_c::get_devices() )
+ dev_list.push_back( dev );
#endif
#ifdef ENABLE_HACKRF
- BOOST_FOREACH( std::string dev, hackrf_source_c::get_devices() )
- dev_list.push_back( dev );
+ BOOST_FOREACH( std::string dev, hackrf_source_c::get_devices() )
+ dev_list.push_back( dev );
#endif
#ifdef ENABLE_AIRSPY
- BOOST_FOREACH( std::string dev, airspy_source_c::get_devices() )
- dev_list.push_back( dev );
+ BOOST_FOREACH( std::string dev, airspy_source_c::get_devices() )
+ dev_list.push_back( dev );
#endif
-// std::cerr << std::endl;
-// BOOST_FOREACH( std::string dev, dev_list )
-// std::cerr << "'" << dev << "'" << std::endl;
+// std::cerr << std::endl;
+// BOOST_FOREACH( std::string dev, dev_list )
+// std::cerr << "'" << dev << "'" << std::endl;
- if (!device_specified) {
if ( dev_list.size() )
arg_list.push_back( dev_list.front() );
else