sink/source: fix error message when unable to connect blocks internally

wip-signat
Dimitri Stolnikov 9 years ago
parent 8b3f711f12
commit 7d2a577571
  1. 6
      lib/sink_impl.cc
  2. 6
      lib/source_impl.cc

@ -176,12 +176,14 @@ sink_impl::sink_impl( const std::string &args )
} catch ( std::exception &ex ) {
std::cerr << std::endl << "FATAL: " << ex.what() << std::endl << std::endl;
size_t missing_chans = output_signature()->max_streams() - channel;
size_t missing_chans = 0;
if ( input_signature()->max_streams() > 0 )
missing_chans = input_signature()->max_streams() - channel;
std::cerr << "Trying to fill up " << missing_chans
<< " missing channel(s) with null sink(s).\n"
<< "This is being done to prevent the application from crashing\n"
<< "due to a gnuradio bug. The maintainers have been informed.\n"
<< "due to gnuradio bug #528.\n"
<< std::endl;
for (size_t i = 0; i < missing_chans; i++) {

@ -323,12 +323,14 @@ source_impl::source_impl( const std::string &args )
connect(null_source, 0, throttle, 0);
size_t missing_chans = output_signature()->max_streams() - channel;
size_t missing_chans = 0;
if ( output_signature()->max_streams() > 0 )
missing_chans = output_signature()->max_streams() - channel;
std::cerr << "Trying to fill up " << missing_chans
<< " missing channel(s) with null source(s).\n"
<< "This is being done to prevent the application from crashing\n"
<< "due to a gnuradio bug. The maintainers have been informed.\n"
<< "due to gnuradio bug #528.\n"
<< std::endl;
for (size_t i = 0; i < missing_chans; i++)

Loading…
Cancel
Save