projects
/
debian
/
gnuradio
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4267b71
)
Return immediately when using d_residual.
author
Eric Blossom
<eb@comsec.com>
Thu, 20 May 2010 03:38:17 +0000
(20:38 -0700)
committer
Eric Blossom
<eb@comsec.com>
Thu, 20 May 2010 03:38:17 +0000
(20:38 -0700)
(Otherwise recv may overwrite valid data in d_temp_buff.)
gnuradio-core/src/lib/io/gr_udp_source.cc
patch
|
blob
|
history
diff --git
a/gnuradio-core/src/lib/io/gr_udp_source.cc
b/gnuradio-core/src/lib/io/gr_udp_source.cc
index 1197a0c436c79e16423533a121304cfebd1210c5..da5b8a19159b7c6c312662297aad4a2e50b74b1d 100755
(executable)
--- 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