commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 43/148: minor tweak to transport loop and d


From: git
Subject: [Commit-gnuradio] [gnuradio] 43/148: minor tweak to transport loop and debug printf for vrt
Date: Mon, 15 Aug 2016 00:47:23 +0000 (UTC)

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

nwest pushed a commit to annotated tag old_usrp_devel_udp
in repository gnuradio.

commit f641f9319109b73907bf2f50f16ec49252f223cb
Author: Josh Blum <address@hidden>
Date:   Wed Nov 18 17:12:27 2009 -0800

    minor tweak to transport loop and debug printf for vrt
---
 usrp2/host/lib/transport.cc  | 2 +-
 usrp2/host/lib/usrp2_impl.cc | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/usrp2/host/lib/transport.cc b/usrp2/host/lib/transport.cc
index f886973..ae2cd98 100644
--- a/usrp2/host/lib/transport.cc
+++ b/usrp2/host/lib/transport.cc
@@ -60,7 +60,7 @@ void usrp2::transport::run(){
             // call recv to get a new sbuffer
             // pass the buffer into the callback
             std::vector<sbuff::sptr> sbs = recv();
-            if (sbs.size()) d_cb(sbs);
+            if (d_running and sbs.size()) d_cb(sbs);
         //catch thread interrupts from join, sleep, etc
         //the running condition will be re-checked
         }catch(boost::thread_interrupted const &){}
diff --git a/usrp2/host/lib/usrp2_impl.cc b/usrp2/host/lib/usrp2_impl.cc
index ebf5b19..cfb15d9 100644
--- a/usrp2/host/lib/usrp2_impl.cc
+++ b/usrp2/host/lib/usrp2_impl.cc
@@ -259,16 +259,15 @@ namespace usrp2 {
     // Try to parse each packet and enqueue the data into the channel ring.
     // Bad packets will be ignored and their data freed by done().
     for (size_t i = 0; i < sbs.size(); i++) {
-        sbuff::sptr sb = sbs[i];
+        ring_data rd; rd.sb = sbs[i];
 
         //parse the vrt header and store into the ring data structure
-        ring_data rd; rd.sb = sb;
         if (not vrt::expanded_header::parse(
             (const uint32_t*)rd.sb->buff(), rd.sb->len()/sizeof(uint32_t), //in
             &rd.hdr, &rd.payload, &rd.n32_bit_words_payload) //out
             or not rd.hdr.stream_id_p()
         ){
-            printf("Bad vrt header 0x%x\n", rd.hdr.header);
+            printf("Bad vrt header 0x%.8x, Packet len %d\n", rd.hdr.header, 
rd.sb->len());
             DEBUG_LOG("!");
             rd.sb->done(); //mark done, this sbuff is no longer needed
             continue;



reply via email to

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