summaryrefslogtreecommitdiff
path: root/gr-blocks
diff options
context:
space:
mode:
Diffstat (limited to 'gr-blocks')
-rw-r--r--gr-blocks/CMakeLists.txt2
-rw-r--r--gr-blocks/docs/CMakeLists.txt (renamed from gr-blocks/doc/CMakeLists.txt)0
-rw-r--r--gr-blocks/docs/README.blocks (renamed from gr-blocks/doc/README.blocks)0
-rw-r--r--gr-blocks/docs/blocks.dox (renamed from gr-blocks/doc/blocks.dox)0
-rw-r--r--gr-blocks/grc/blocks_message_strobe_random.xml2
-rw-r--r--gr-blocks/grc/blocks_vector_insert_x.xml2
-rw-r--r--gr-blocks/include/gnuradio/blocks/interleave.h2
-rw-r--r--gr-blocks/include/gnuradio/blocks/peak_detector_XX.h.t4
-rw-r--r--gr-blocks/include/gnuradio/blocks/rotator.h7
-rw-r--r--gr-blocks/include/gnuradio/blocks/tcp_server_sink.h4
-rw-r--r--gr-blocks/include/gnuradio/blocks/wavfile.h2
-rw-r--r--gr-blocks/lib/message_strobe_impl.cc2
-rw-r--r--gr-blocks/lib/socket_pdu_impl.cc9
-rw-r--r--gr-blocks/lib/tcp_connection.cc4
-rwxr-xr-xgr-blocks/python/blocks/qa_wavfile.py2
15 files changed, 28 insertions, 14 deletions
diff --git a/gr-blocks/CMakeLists.txt b/gr-blocks/CMakeLists.txt
index a4c6184835..34fac58823 100644
--- a/gr-blocks/CMakeLists.txt
+++ b/gr-blocks/CMakeLists.txt
@@ -57,7 +57,7 @@ if(ENABLE_PYTHON)
add_subdirectory(python/blocks)
add_subdirectory(swig)
add_subdirectory(grc)
- add_subdirectory(doc)
+ add_subdirectory(docs)
add_subdirectory(examples)
endif(ENABLE_PYTHON)
diff --git a/gr-blocks/doc/CMakeLists.txt b/gr-blocks/docs/CMakeLists.txt
index 4e185fde06..4e185fde06 100644
--- a/gr-blocks/doc/CMakeLists.txt
+++ b/gr-blocks/docs/CMakeLists.txt
diff --git a/gr-blocks/doc/README.blocks b/gr-blocks/docs/README.blocks
index 7b36898f2e..7b36898f2e 100644
--- a/gr-blocks/doc/README.blocks
+++ b/gr-blocks/docs/README.blocks
diff --git a/gr-blocks/doc/blocks.dox b/gr-blocks/docs/blocks.dox
index fb7d3e67ab..fb7d3e67ab 100644
--- a/gr-blocks/doc/blocks.dox
+++ b/gr-blocks/docs/blocks.dox
diff --git a/gr-blocks/grc/blocks_message_strobe_random.xml b/gr-blocks/grc/blocks_message_strobe_random.xml
index 573db58aef..2ba2d4519a 100644
--- a/gr-blocks/grc/blocks_message_strobe_random.xml
+++ b/gr-blocks/grc/blocks_message_strobe_random.xml
@@ -64,6 +64,6 @@
Please note some peculiarities below:
- poisson does not care about your std
- gaussian operates as expected
- - uniform is actually of the range (mean-std, mean+std) - thus we are lieing and it is not actually an std here
+ - uniform is actually of the range (mean-std, mean+std) - thus we are lying and it is not actually an std here
</doc>
</block>
diff --git a/gr-blocks/grc/blocks_vector_insert_x.xml b/gr-blocks/grc/blocks_vector_insert_x.xml
index 2bc7ada2e6..f70027f53f 100644
--- a/gr-blocks/grc/blocks_vector_insert_x.xml
+++ b/gr-blocks/grc/blocks_vector_insert_x.xml
@@ -75,6 +75,6 @@
Periodicity, the length of the periodicity at which the vector should be inserted at the output.
(i.e. one vector for every N output items)
- Offset sepcifies where in the cycle period we should begin at.
+ Offset specifies where in the cycle period we should begin at.
</doc>
</block>
diff --git a/gr-blocks/include/gnuradio/blocks/interleave.h b/gr-blocks/include/gnuradio/blocks/interleave.h
index 7f7587d267..5de75fcce4 100644
--- a/gr-blocks/include/gnuradio/blocks/interleave.h
+++ b/gr-blocks/include/gnuradio/blocks/interleave.h
@@ -38,7 +38,7 @@ namespace gr {
* This block interleaves blocks of samples. For each input
* connection, the samples are interleaved successively to the
* output connection. By default, the block interleaves a single
- * sample from eahc input to the output unless blocksize is given
+ * sample from each input to the output unless blocksize is given
* in the constructor.
*
* \code
diff --git a/gr-blocks/include/gnuradio/blocks/peak_detector_XX.h.t b/gr-blocks/include/gnuradio/blocks/peak_detector_XX.h.t
index a255e46f0b..6e151c0cbd 100644
--- a/gr-blocks/include/gnuradio/blocks/peak_detector_XX.h.t
+++ b/gr-blocks/include/gnuradio/blocks/peak_detector_XX.h.t
@@ -48,12 +48,12 @@ namespace gr {
/*!
* Make a peak detector block.
*
- * \param threshold_factor_rise The threshold factor determins
+ * \param threshold_factor_rise The threshold factor determines
* when a peak has started. An average of the signal is
* calculated and when the value of the signal goes over
* threshold_factor_rise*average, we start looking for a
* peak.
- * \param threshold_factor_fall The threshold factor determins
+ * \param threshold_factor_fall The threshold factor determines
* when a peak has ended. An average of the signal is
* calculated and when the value of the signal goes
* below threshold_factor_fall*average, we stop looking
diff --git a/gr-blocks/include/gnuradio/blocks/rotator.h b/gr-blocks/include/gnuradio/blocks/rotator.h
index 66843fde07..978297716d 100644
--- a/gr-blocks/include/gnuradio/blocks/rotator.h
+++ b/gr-blocks/include/gnuradio/blocks/rotator.h
@@ -26,6 +26,7 @@
#include <gnuradio/blocks/api.h>
#include <gnuradio/gr_complex.h>
#include <volk/volk.h>
+#include <cmath>
namespace gr {
namespace blocks {
@@ -41,8 +42,8 @@ namespace gr {
rotator() : d_phase(1), d_phase_incr(1), d_counter(0)
{ }
- void set_phase(gr_complex phase) { d_phase = phase / abs(phase); }
- void set_phase_incr(gr_complex incr) { d_phase_incr = incr / abs(incr); }
+ void set_phase(gr_complex phase) { d_phase = phase / std::abs(phase); }
+ void set_phase_incr(gr_complex incr) { d_phase_incr = incr / std::abs(incr); }
gr_complex rotate(gr_complex in)
{
@@ -52,7 +53,7 @@ namespace gr {
d_phase *= d_phase_incr; // incr our phase (complex mult == add phases)
if((d_counter % 512) == 0)
- d_phase /= abs(d_phase); // Normalize to ensure multiplication is rotation
+ d_phase /= std::abs(d_phase); // Normalize to ensure multiplication is rotation
return z;
}
diff --git a/gr-blocks/include/gnuradio/blocks/tcp_server_sink.h b/gr-blocks/include/gnuradio/blocks/tcp_server_sink.h
index 6d951a8e67..a8a5908fdd 100644
--- a/gr-blocks/include/gnuradio/blocks/tcp_server_sink.h
+++ b/gr-blocks/include/gnuradio/blocks/tcp_server_sink.h
@@ -34,8 +34,8 @@ namespace gr {
* \ingroup networking_tools_blk
*
* \details
- * Listen for incomming TCP connection(s). Duplicate data for each
- * opened connection. Optionaly can wait until first client connects
+ * Listen for incoming TCP connection(s). Duplicate data for each
+ * opened connection. Optionally can wait until first client connects
* before streaming starts.
*/
class BLOCKS_API tcp_server_sink : virtual public gr::sync_block
diff --git a/gr-blocks/include/gnuradio/blocks/wavfile.h b/gr-blocks/include/gnuradio/blocks/wavfile.h
index bc1175a6cb..2c03319c4a 100644
--- a/gr-blocks/include/gnuradio/blocks/wavfile.h
+++ b/gr-blocks/include/gnuradio/blocks/wavfile.h
@@ -91,7 +91,7 @@ namespace gr {
* Note: The stream position is changed during this function. If
* anything needs to be written to the WAV file after calling this
* function (which shouldn't happen), you need to fseek() to the
- * end of the file (or whereever).
+ * end of the file (or wherever).
*
* \param[in] fp File pointer to an open WAV file with a blank header
* \param[in] byte_count Length of all samples written to the file in bytes.
diff --git a/gr-blocks/lib/message_strobe_impl.cc b/gr-blocks/lib/message_strobe_impl.cc
index d12e0ebd4d..96b079a0ed 100644
--- a/gr-blocks/lib/message_strobe_impl.cc
+++ b/gr-blocks/lib/message_strobe_impl.cc
@@ -67,7 +67,7 @@ namespace gr {
bool
message_strobe_impl::start()
{
- // NOTE: d_finished should be something explicitely thread safe. But since
+ // NOTE: d_finished should be something explicitly thread safe. But since
// nothing breaks on concurrent access, I'll just leave it as bool.
d_finished = false;
d_thread = boost::shared_ptr<gr::thread::thread>
diff --git a/gr-blocks/lib/socket_pdu_impl.cc b/gr-blocks/lib/socket_pdu_impl.cc
index cc45557bca..efb778f404 100644
--- a/gr-blocks/lib/socket_pdu_impl.cc
+++ b/gr-blocks/lib/socket_pdu_impl.cc
@@ -184,6 +184,15 @@ namespace gr {
socket_pdu_impl::handle_tcp_accept(tcp_connection::sptr new_connection, const boost::system::error_code& error)
{
if (!error) {
+ // Garbage collect closed sockets
+ std::vector<tcp_connection::sptr>::iterator it = d_tcp_connections.begin();
+ while(it != d_tcp_connections.end()) {
+ if (! (**it).socket().is_open())
+ it = d_tcp_connections.erase(it);
+ else
+ ++it;
+ }
+
new_connection->start(this);
d_tcp_connections.push_back(new_connection);
start_tcp_accept();
diff --git a/gr-blocks/lib/tcp_connection.cc b/gr-blocks/lib/tcp_connection.cc
index b28accccf7..200e82b89f 100644
--- a/gr-blocks/lib/tcp_connection.cc
+++ b/gr-blocks/lib/tcp_connection.cc
@@ -102,6 +102,10 @@ namespace gr {
boost::asio::placeholders::error,
boost::asio::placeholders::bytes_transferred));
}
+ else {
+ d_socket.shutdown(boost::asio::ip::tcp::socket::shutdown_both);
+ d_socket.close();
+ }
}
} /* namespace blocks */
}/* namespace gr */
diff --git a/gr-blocks/python/blocks/qa_wavfile.py b/gr-blocks/python/blocks/qa_wavfile.py
index 5c3a69e1d0..97978c936d 100755
--- a/gr-blocks/python/blocks/qa_wavfile.py
+++ b/gr-blocks/python/blocks/qa_wavfile.py
@@ -54,7 +54,7 @@ class test_wavefile(gr_unittest.TestCase):
self.tb.run()
wf_out.close()
- # we're loosing all extra header chunks
+ # we're losing all extra header chunks
self.assertEqual(getsize(infile) - g_extra_header_len, getsize(outfile))
in_f = file(infile, 'rb')