commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 07/10: udp sink: actually send 0-byte packe


From: git
Subject: [Commit-gnuradio] [gnuradio] 07/10: udp sink: actually send 0-byte packets at EOF
Date: Mon, 25 Apr 2016 22:56:28 +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 403a41671d8b867e6ed68e3eeb81e57766c7cc32
Author: Andy Sloane <address@hidden>
Date:   Mon Apr 18 08:49:26 2016 -0700

    udp sink: actually send 0-byte packets at EOF
    
    Adjusted udp source to expect a 0-byte packet at EOF too.
---
 gr-blocks/lib/udp_sink_impl.cc   | 2 +-
 gr-blocks/lib/udp_source_impl.cc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gr-blocks/lib/udp_sink_impl.cc b/gr-blocks/lib/udp_sink_impl.cc
index 6989fdb..b540a7d 100644
--- a/gr-blocks/lib/udp_sink_impl.cc
+++ b/gr-blocks/lib/udp_sink_impl.cc
@@ -99,7 +99,7 @@ namespace gr {
       gr::thread::scoped_lock guard(d_mutex);  // protect d_socket from work()
 
       // Send a few zero-length packets to signal receiver we are done
-      boost::array<char, 1> send_buf = {{ 0 }};
+      boost::array<char, 0> send_buf;
       if(d_eof) {
         int i;
         for(i = 0; i < 3; i++)
diff --git a/gr-blocks/lib/udp_source_impl.cc b/gr-blocks/lib/udp_source_impl.cc
index b1977a8..e09ed43 100644
--- a/gr-blocks/lib/udp_source_impl.cc
+++ b/gr-blocks/lib/udp_source_impl.cc
@@ -149,7 +149,7 @@ namespace gr {
       if(!error) {
         {
           boost::lock_guard<gr::thread::mutex> lock(d_udp_mutex);
-          if(d_eof && (bytes_transferred == 1) && (d_rxbuf[0] == 0x00)) {
+          if(d_eof && (bytes_transferred == 0)) {
             // If we are using EOF notification, test for it and don't
             // add anything to the output.
             d_residual = WORK_DONE;



reply via email to

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