projects
/
debian
/
gnuradio
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
91054ed
)
Simplify USE_SELECT usage
author
Eric Blossom
<eb@comsec.com>
Thu, 20 May 2010 03:43:48 +0000
(20:43 -0700)
committer
Eric Blossom
<eb@comsec.com>
Thu, 20 May 2010 03:43:48 +0000
(20:43 -0700)
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 da5b8a19159b7c6c312662297aad4a2e50b74b1d..fea9a26ba40083c3fb25768ed08badae5763fc1b 100755
(executable)
--- a/
gnuradio-core/src/lib/io/gr_udp_source.cc
+++ b/
gnuradio-core/src/lib/io/gr_udp_source.cc
@@
-249,18
+249,14
@@
gr_udp_source::work (int noutput_items,
return nbytes/d_itemsize;
}
return nbytes/d_itemsize;
}
-#if USE_SELECT
- // Use select() to determine when socket is readable
- fd_set readfds;
- timeval timeout;
-#endif
-
while(1) {
// get the data into our output buffer and record the number of bytes
#if USE_SELECT
// RCV_TIMEO doesn't work on all systems (e.g., Cygwin)
// use select() instead of, or in addition to RCV_TIMEO
while(1) {
// get the data into our output buffer and record the number of bytes
#if USE_SELECT
// RCV_TIMEO doesn't work on all systems (e.g., Cygwin)
// use select() instead of, or in addition to RCV_TIMEO
+ fd_set readfds;
+ timeval timeout;
timeout.tv_sec = 1; // Init timeout each iteration. Select can modify it.
timeout.tv_usec = 0;
FD_ZERO(&readfds);
timeout.tv_sec = 1; // Init timeout each iteration. Select can modify it.
timeout.tv_usec = 0;
FD_ZERO(&readfds);