summaryrefslogtreecommitdiff
path: root/gnuradio-core/src
diff options
context:
space:
mode:
authorEric Blossom <eb@comsec.com>2010-05-19 20:38:17 -0700
committerEric Blossom <eb@comsec.com>2010-05-19 20:38:17 -0700
commit91054ed9fe7f08cac9738a6a6af5a9ad476ba24b (patch)
treee189379040a8b86a6c1be5ab54b4ab9a01c966e4 /gnuradio-core/src
parent4267b714f4276671f718136a1279f681a4231aee (diff)
Return immediately when using d_residual.
(Otherwise recv may overwrite valid data in d_temp_buff.)
Diffstat (limited to 'gnuradio-core/src')
-rwxr-xr-xgnuradio-core/src/lib/io/gr_udp_source.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnuradio-core/src/lib/io/gr_udp_source.cc b/gnuradio-core/src/lib/io/gr_udp_source.cc
index 1197a0c436..da5b8a1915 100755
--- a/gnuradio-core/src/lib/io/gr_udp_source.cc
+++ b/gnuradio-core/src/lib/io/gr_udp_source.cc
@@ -243,7 +243,10 @@ gr_udp_source::work (int noutput_items,
// Update indexing of amount of bytes left in the buffer
d_residual -= nbytes;
d_temp_offset += nbytes;
- // FIXME? Returning here could simplify life...
+
+ // Return now with what we've got.
+ assert(nbytes % d_itemsize == 0);
+ return nbytes/d_itemsize;
}
#if USE_SELECT