source/sink: don't discover devices if already specified via args

This commit is contained in:
Dimitri Stolnikov 2014-10-21 21:44:29 +02:00
parent 4bb2fa4e2f
commit 7a8224bcb8
2 changed files with 34 additions and 34 deletions

View File

@ -104,6 +104,7 @@ sink_impl::sink_impl( const std::string &args )
#ifdef WORKAROUND_GR_HIER_BLOCK2_BUG
try {
#endif
if ( ! device_specified ) {
std::vector< std::string > dev_list;
#ifdef ENABLE_UHD
BOOST_FOREACH( std::string dev, uhd_sink_c::get_devices() )
@ -122,7 +123,6 @@ sink_impl::sink_impl( const std::string &args )
// 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

View File

@ -168,6 +168,7 @@ source_impl::source_impl( const std::string &args )
#ifdef WORKAROUND_GR_HIER_BLOCK2_BUG
try {
#endif
if ( ! device_specified ) {
std::vector< std::string > dev_list;
#ifdef ENABLE_OSMOSDR
BOOST_FOREACH( std::string dev, osmosdr_src_c::get_devices() )
@ -210,7 +211,6 @@ source_impl::source_impl( const std::string &args )
// 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