aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2013-11-06 20:55:46 +0100
committerDimitri Stolnikov <horiz0n@gmx.net>2013-11-06 20:55:46 +0100
commit7d2a577571cfcc6529b5688187891f97d4b21684 (patch)
tree57e44eb3b2c6d04b27d68363775dc9035bef5743 /lib
parent8b3f711f12b86da66ddbca11815ce8a34742fe3e (diff)
sink/source: fix error message when unable to connect blocks internally
Diffstat (limited to 'lib')
-rw-r--r--lib/sink_impl.cc6
-rw-r--r--lib/source_impl.cc6
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/sink_impl.cc b/lib/sink_impl.cc
index a3fb84d..94a7f33 100644
--- a/lib/sink_impl.cc
+++ b/lib/sink_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++) {
diff --git a/lib/source_impl.cc b/lib/source_impl.cc
index 96471f1..7672de1 100644
--- a/lib/source_impl.cc
+++ b/lib/source_impl.cc
@@ -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++)