aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2013-11-06 20:55:46 +0100
committerDimitri Stolnikov <horiz0n@gmx.net>2013-12-05 00:02:22 +0100
commit05e17c6417627d112f97b1232edfbc34fc3b7b11 (patch)
tree30ac421ac83ed0c1496330c82beb5e188fea586b
parent70cd91f505a3fb2546e999c2257ac19cd342a0f1 (diff)
sink/source: fix error message when unable to connect blocks internally
-rw-r--r--lib/osmosdr_sink_c_impl.cc6
-rw-r--r--lib/osmosdr_source_c_impl.cc6
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/osmosdr_sink_c_impl.cc b/lib/osmosdr_sink_c_impl.cc
index 9da3b91..62bdece 100644
--- a/lib/osmosdr_sink_c_impl.cc
+++ b/lib/osmosdr_sink_c_impl.cc
@@ -178,12 +178,14 @@ osmosdr_sink_c_impl::osmosdr_sink_c_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 sinks.\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/osmosdr_source_c_impl.cc b/lib/osmosdr_source_c_impl.cc
index 0dea5f6..5b615d8 100644
--- a/lib/osmosdr_source_c_impl.cc
+++ b/lib/osmosdr_source_c_impl.cc
@@ -322,12 +322,14 @@ osmosdr_source_c_impl::osmosdr_source_c_impl (const std::string &args)
connect(noise_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 gaussian noise.\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++)