[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/03: blocks: UDP sink does not enforce IP
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/03: blocks: UDP sink does not enforce IPv4 |
Date: |
Sat, 22 Nov 2014 21:10:19 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit c24c819851bb7aab52ee6e37c66741e921c48e93
Author: Jiří Pinkava <address@hidden>
Date: Thu Jul 10 04:15:04 2014 +0000
blocks: UDP sink does not enforce IPv4
---
gr-blocks/lib/udp_sink_impl.cc | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gr-blocks/lib/udp_sink_impl.cc b/gr-blocks/lib/udp_sink_impl.cc
index ae6488f..6989fdb 100644
--- a/gr-blocks/lib/udp_sink_impl.cc
+++ b/gr-blocks/lib/udp_sink_impl.cc
@@ -76,13 +76,12 @@ namespace gr {
std::string s_port = (boost::format("%d")%port).str();
if(host.size() > 0) {
boost::asio::ip::udp::resolver resolver(d_io_service);
- boost::asio::ip::udp::resolver::query query(boost::asio::ip::udp::v4(),
- host, s_port,
+ boost::asio::ip::udp::resolver::query query(host, s_port,
boost::asio::ip::resolver_query_base::passive);
d_endpoint = *resolver.resolve(query);
d_socket = new boost::asio::ip::udp::socket(d_io_service);
- d_socket->open(boost::asio::ip::udp::v4());
+ d_socket->open(d_endpoint.protocol());
boost::asio::socket_base::reuse_address roption(true);
d_socket->set_option(roption);