commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r11046 - gnuradio/branches/developers/eb/vrt/vrt/apps


From: eb
Subject: [Commit-gnuradio] r11046 - gnuradio/branches/developers/eb/vrt/vrt/apps
Date: Fri, 15 May 2009 10:12:36 -0600 (MDT)

Author: eb
Date: 2009-05-15 10:12:35 -0600 (Fri, 15 May 2009)
New Revision: 11046

Modified:
   gnuradio/branches/developers/eb/vrt/vrt/apps/simple_rx_samples.cc
Log:
cleanup pkt_cnt check

Modified: gnuradio/branches/developers/eb/vrt/vrt/apps/simple_rx_samples.cc
===================================================================
--- gnuradio/branches/developers/eb/vrt/vrt/apps/simple_rx_samples.cc   
2009-05-15 15:08:59 UTC (rev 11045)
+++ gnuradio/branches/developers/eb/vrt/vrt/apps/simple_rx_samples.cc   
2009-05-15 16:12:35 UTC (rev 11046)
@@ -191,15 +191,15 @@
                           size_t n32_bit_words,
                           const vrt::expanded_header *hdr)
 {
-  d_nsamples += n32_bit_words;
-  d_npackets++;
-
-  if (hdr->pkt_cnt() != ((d_last_pkt_cnt + 1) & 0xf)){
+  if (d_npackets != 0 && hdr->pkt_cnt() != ((d_last_pkt_cnt + 1) & 0xf)){
     d_nwrong_pkt_cnt++;
-    fprintf(stderr, "bad cnt ");
+    fprintf(stderr, "bad cnt (pkt %d)\n", d_npackets);
   }
   d_last_pkt_cnt = hdr->pkt_cnt();
 
+  d_nsamples += n32_bit_words;
+  d_npackets++;
+
   return !has_finished_p();
 }
 





reply via email to

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