summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib
diff options
context:
space:
mode:
authorEric Blossom2010-05-19 20:43:48 -0700
committerEric Blossom2010-05-19 20:43:48 -0700
commit26185e9077e5e20f71fb515c0e847a5dfd57986c (patch)
tree55b8e77c432df69eb6420e068ae9840e26cd3bf8 /gnuradio-core/src/lib
parent91054ed9fe7f08cac9738a6a6af5a9ad476ba24b (diff)
downloadgnuradio-26185e9077e5e20f71fb515c0e847a5dfd57986c.tar.gz
gnuradio-26185e9077e5e20f71fb515c0e847a5dfd57986c.tar.bz2
gnuradio-26185e9077e5e20f71fb515c0e847a5dfd57986c.zip
Simplify USE_SELECT usage
Diffstat (limited to 'gnuradio-core/src/lib')
-rwxr-xr-xgnuradio-core/src/lib/io/gr_udp_source.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/gnuradio-core/src/lib/io/gr_udp_source.cc b/gnuradio-core/src/lib/io/gr_udp_source.cc
index da5b8a191..fea9a26ba 100755
--- 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;
}
-#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
+ fd_set readfds;
+ timeval timeout;
timeout.tv_sec = 1; // Init timeout each iteration. Select can modify it.
timeout.tv_usec = 0;
FD_ZERO(&readfds);