diff options
author | Eric Blossom <eb@comsec.com> | 2010-05-19 20:38:17 -0700 |
---|---|---|
committer | Eric Blossom <eb@comsec.com> | 2010-05-19 20:38:17 -0700 |
commit | 91054ed9fe7f08cac9738a6a6af5a9ad476ba24b (patch) | |
tree | e189379040a8b86a6c1be5ab54b4ab9a01c966e4 /gnuradio-core/src | |
parent | 4267b714f4276671f718136a1279f681a4231aee (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-x | gnuradio-core/src/lib/io/gr_udp_source.cc | 5 |
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 |