commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 01/03: blocks: Address Issue #816.


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/03: blocks: Address Issue #816.
Date: Thu, 30 Jul 2015 13:46:58 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit bc82238e3468e7db6cc5462a666174fc662b0454
Author: Tom Rondeau <address@hidden>
Date:   Wed Jul 29 15:45:59 2015 -0400

    blocks: Address Issue #816.
    
    If any input stream has tags, set toprint to true. Use this as the way
    to gate printing of sout.
---
 gr-blocks/lib/tag_debug_impl.cc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gr-blocks/lib/tag_debug_impl.cc b/gr-blocks/lib/tag_debug_impl.cc
index d2409ad..a4c4c69 100644
--- a/gr-blocks/lib/tag_debug_impl.cc
+++ b/gr-blocks/lib/tag_debug_impl.cc
@@ -98,6 +98,7 @@ namespace gr {
                          gr_vector_void_star &output_items)
     {
       gr::thread::scoped_lock l(d_mutex);
+      bool toprint = false;
 
       std::stringstream sout;
       if(d_display) {
@@ -117,6 +118,10 @@ namespace gr {
         else
           get_tags_in_range(d_tags, i, abs_N, end_N, d_filter);
 
+        if(d_tags.size() > 0) {
+          toprint = true;
+        }
+
         if(d_display) {
           sout << "Input Stream: " << std::setw(2) << std::setfill('0')
                << i << std::setfill(' ') << std::endl;
@@ -135,8 +140,9 @@ namespace gr {
         sout << 
"----------------------------------------------------------------------";
         sout << std::endl;
 
-        if(d_tags.size() > 0)
+        if(toprint) {
           std::cout << sout.str();
+        }
       }
 
       return noutput_items;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]