commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 05/13: socket_pdu: fixed resolver issue by


From: git
Subject: [Commit-gnuradio] [gnuradio] 05/13: socket_pdu: fixed resolver issue by applying same resolver as in udp_sink.
Date: Tue, 15 Apr 2014 23:55:53 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit e1d838e47f4f9e20ef80946e274bc0d9afcf4091
Author: Marcus Müller <address@hidden>
Date:   Sat Apr 12 19:16:31 2014 +0200

    socket_pdu: fixed resolver issue by applying same resolver as in udp_sink.
    
    Basically a version of http://gnuradio.org/redmine/issues/613 reported
    by Alex Weihkopf in socket_pdu.
    Patch is the same.
---
 gr-blocks/lib/socket_pdu_impl.cc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gr-blocks/lib/socket_pdu_impl.cc b/gr-blocks/lib/socket_pdu_impl.cc
index 3e483fb..a467452 100644
--- a/gr-blocks/lib/socket_pdu_impl.cc
+++ b/gr-blocks/lib/socket_pdu_impl.cc
@@ -57,7 +57,9 @@ namespace gr {
       }
       else if ((type == "TCP_SERVER") || (type == "TCP_CLIENT")) {
         boost::asio::ip::tcp::resolver resolver(d_io_service);
-        boost::asio::ip::tcp::resolver::query 
query(boost::asio::ip::tcp::v4(), addr, port);
+        boost::asio::ip::tcp::resolver::query query(boost::asio::ip::tcp::v4(),
+                       addr, port,
+                       boost::asio::ip::resolver_query_base::passive);
         d_tcp_endpoint = *resolver.resolve(query);
       }
       else if ((type == "UDP_SERVER") && ((addr.empty()) || (addr == 
"0.0.0.0"))) {  // Bind on all interfaces
@@ -68,7 +70,9 @@ namespace gr {
       }
       else if ((type == "UDP_SERVER") || (type == "UDP_CLIENT")) {
         boost::asio::ip::udp::resolver resolver(d_io_service);
-        boost::asio::ip::udp::resolver::query 
query(boost::asio::ip::udp::v4(), addr, port);
+        boost::asio::ip::udp::resolver::query query(boost::asio::ip::udp::v4(),
+                       addr, port,
+                       boost::asio::ip::resolver_query_base::passive);
 
         if (type == "UDP_SERVER")
           d_udp_endpoint = *resolver.resolve(query);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]