diff options
author | Brennan Ashton <bashton@brennanashton.com> | 2019-10-28 22:05:09 -0700 |
---|---|---|
committer | Marcus Müller <mmueller@gnuradio.org> | 2019-11-01 16:02:11 +0100 |
commit | 189cc957e8dd5956771f7676d0a14ce573672432 (patch) | |
tree | 9b8011af3301fb2dc7764195b1bea93264bafb97 | |
parent | 97b4b75d26c5074b4dd6d16ae73bb8f1400c1e17 (diff) |
gr-zeromq: Fix warnings deprecated send since 4.3.1 extends PR #2503
Wrap some missed send calls with helper define and make sure
zmq_common_impl.h is being used everywhere instead of zmq.hpp
Most were already pulling this in via the base_impl.h
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
-rw-r--r-- | gr-zeromq/lib/pub_msg_sink_impl.cc | 4 | ||||
-rw-r--r-- | gr-zeromq/lib/pub_msg_sink_impl.h | 2 | ||||
-rw-r--r-- | gr-zeromq/lib/pub_sink_impl.h | 1 | ||||
-rw-r--r-- | gr-zeromq/lib/pull_source_impl.h | 1 | ||||
-rw-r--r-- | gr-zeromq/lib/push_msg_sink_impl.cc | 4 | ||||
-rw-r--r-- | gr-zeromq/lib/push_msg_sink_impl.h | 2 | ||||
-rw-r--r-- | gr-zeromq/lib/push_sink_impl.h | 1 | ||||
-rw-r--r-- | gr-zeromq/lib/rep_msg_sink_impl.cc | 4 | ||||
-rw-r--r-- | gr-zeromq/lib/req_source_impl.cc | 4 | ||||
-rw-r--r-- | gr-zeromq/lib/req_source_impl.h | 1 | ||||
-rw-r--r-- | gr-zeromq/lib/sub_source_impl.h | 1 | ||||
-rw-r--r-- | gr-zeromq/lib/tag_headers.cc | 2 | ||||
-rw-r--r-- | gr-zeromq/lib/tag_headers.h | 2 |
13 files changed, 20 insertions, 9 deletions
diff --git a/gr-zeromq/lib/pub_msg_sink_impl.cc b/gr-zeromq/lib/pub_msg_sink_impl.cc index 0fb26ada73..d8ec13043a 100644 --- a/gr-zeromq/lib/pub_msg_sink_impl.cc +++ b/gr-zeromq/lib/pub_msg_sink_impl.cc @@ -73,7 +73,11 @@ void pub_msg_sink_impl::handler(pmt::pmt_t msg) zmq::message_t zmsg(s.size()); memcpy(zmsg.data(), s.c_str(), s.size()); +#if USE_NEW_CPPZMQ_SEND_RECV + d_socket->send(zmsg, zmq::send_flags::none); +#else d_socket->send(zmsg); +#endif } } /* namespace zeromq */ diff --git a/gr-zeromq/lib/pub_msg_sink_impl.h b/gr-zeromq/lib/pub_msg_sink_impl.h index cfd81ca399..b40a88cc8b 100644 --- a/gr-zeromq/lib/pub_msg_sink_impl.h +++ b/gr-zeromq/lib/pub_msg_sink_impl.h @@ -23,8 +23,8 @@ #ifndef INCLUDED_ZEROMQ_PUB_MSG_SINK_IMPL_H #define INCLUDED_ZEROMQ_PUB_MSG_SINK_IMPL_H +#include "zmq_common_impl.h" #include <gnuradio/zeromq/pub_msg_sink.h> -#include <zmq.hpp> namespace gr { namespace zeromq { diff --git a/gr-zeromq/lib/pub_sink_impl.h b/gr-zeromq/lib/pub_sink_impl.h index aaa39153d5..624b071a8d 100644 --- a/gr-zeromq/lib/pub_sink_impl.h +++ b/gr-zeromq/lib/pub_sink_impl.h @@ -24,7 +24,6 @@ #define INCLUDED_ZEROMQ_PUB_SINK_IMPL_H #include <gnuradio/zeromq/pub_sink.h> -#include <zmq.hpp> #include "base_impl.h" diff --git a/gr-zeromq/lib/pull_source_impl.h b/gr-zeromq/lib/pull_source_impl.h index 7ae2743f92..2b0fecc820 100644 --- a/gr-zeromq/lib/pull_source_impl.h +++ b/gr-zeromq/lib/pull_source_impl.h @@ -24,7 +24,6 @@ #define INCLUDED_ZEROMQ_PULL_SOURCE_IMPL_H #include <gnuradio/zeromq/pull_source.h> -#include <zmq.hpp> #include "base_impl.h" diff --git a/gr-zeromq/lib/push_msg_sink_impl.cc b/gr-zeromq/lib/push_msg_sink_impl.cc index 5239a22e78..c2c6e3bf41 100644 --- a/gr-zeromq/lib/push_msg_sink_impl.cc +++ b/gr-zeromq/lib/push_msg_sink_impl.cc @@ -75,7 +75,11 @@ void push_msg_sink_impl::handler(pmt::pmt_t msg) zmq::message_t zmsg(s.size()); memcpy(zmsg.data(), s.c_str(), s.size()); +#if USE_NEW_CPPZMQ_SEND_RECV + d_socket->send(zmsg, zmq::send_flags::none); +#else d_socket->send(zmsg); +#endif } } /* namespace zeromq */ diff --git a/gr-zeromq/lib/push_msg_sink_impl.h b/gr-zeromq/lib/push_msg_sink_impl.h index 4d3017f782..ab453fc98e 100644 --- a/gr-zeromq/lib/push_msg_sink_impl.h +++ b/gr-zeromq/lib/push_msg_sink_impl.h @@ -23,8 +23,8 @@ #ifndef INCLUDED_ZEROMQ_PUSH_MSG_SINK_IMPL_H #define INCLUDED_ZEROMQ_PUSH_MSG_SINK_IMPL_H +#include "zmq_common_impl.h" #include <gnuradio/zeromq/push_msg_sink.h> -#include <zmq.hpp> namespace gr { namespace zeromq { diff --git a/gr-zeromq/lib/push_sink_impl.h b/gr-zeromq/lib/push_sink_impl.h index 6ca5eeaaca..b66ff06fd3 100644 --- a/gr-zeromq/lib/push_sink_impl.h +++ b/gr-zeromq/lib/push_sink_impl.h @@ -24,7 +24,6 @@ #define INCLUDED_ZEROMQ_PUSH_SINK_IMPL_H #include <gnuradio/zeromq/push_sink.h> -#include <zmq.hpp> #include "base_impl.h" diff --git a/gr-zeromq/lib/rep_msg_sink_impl.cc b/gr-zeromq/lib/rep_msg_sink_impl.cc index e1ac19e809..c2e187ff2c 100644 --- a/gr-zeromq/lib/rep_msg_sink_impl.cc +++ b/gr-zeromq/lib/rep_msg_sink_impl.cc @@ -117,7 +117,11 @@ void rep_msg_sink_impl::readloop() std::string s = sb.str(); zmq::message_t zmsg(s.size()); memcpy(zmsg.data(), s.c_str(), s.size()); +#if USE_NEW_CPPZMQ_SEND_RECV + d_socket->send(zmsg, zmq::send_flags::none); +#else d_socket->send(zmsg); +#endif } // if req } // while !empty diff --git a/gr-zeromq/lib/req_source_impl.cc b/gr-zeromq/lib/req_source_impl.cc index c7e87b742a..f9f06362c4 100644 --- a/gr-zeromq/lib/req_source_impl.cc +++ b/gr-zeromq/lib/req_source_impl.cc @@ -77,7 +77,11 @@ int req_source_impl::work(int noutput_items, uint32_t req_len = noutput_items - done; zmq::message_t request(sizeof(uint32_t)); memcpy((void*)request.data(), &req_len, sizeof(uint32_t)); +#if USE_NEW_CPPZMQ_SEND_RECV + d_socket->send(request, zmq::send_flags::none); +#else d_socket->send(request); +#endif d_req_pending = true; } diff --git a/gr-zeromq/lib/req_source_impl.h b/gr-zeromq/lib/req_source_impl.h index 89bef794e0..eb95499b18 100644 --- a/gr-zeromq/lib/req_source_impl.h +++ b/gr-zeromq/lib/req_source_impl.h @@ -24,7 +24,6 @@ #define INCLUDED_ZEROMQ_REQ_SOURCE_IMPL_H #include <gnuradio/zeromq/req_source.h> -#include <zmq.hpp> #include "base_impl.h" diff --git a/gr-zeromq/lib/sub_source_impl.h b/gr-zeromq/lib/sub_source_impl.h index f6af9090ea..94eaac68f6 100644 --- a/gr-zeromq/lib/sub_source_impl.h +++ b/gr-zeromq/lib/sub_source_impl.h @@ -24,7 +24,6 @@ #define INCLUDED_ZEROMQ_SUB_SOURCE_IMPL_H #include <gnuradio/zeromq/sub_source.h> -#include <zmq.hpp> #include "base_impl.h" diff --git a/gr-zeromq/lib/tag_headers.cc b/gr-zeromq/lib/tag_headers.cc index 34d2dd701d..2d89719197 100644 --- a/gr-zeromq/lib/tag_headers.cc +++ b/gr-zeromq/lib/tag_headers.cc @@ -20,9 +20,9 @@ * Boston, MA 02110-1301, USA. */ +#include "zmq_common_impl.h" #include <gnuradio/block.h> #include <gnuradio/io_signature.h> -#include <zmq.hpp> #include <cstring> #include <sstream> diff --git a/gr-zeromq/lib/tag_headers.h b/gr-zeromq/lib/tag_headers.h index b946f009a4..c449f9cecf 100644 --- a/gr-zeromq/lib/tag_headers.h +++ b/gr-zeromq/lib/tag_headers.h @@ -23,9 +23,9 @@ #ifndef ZEROMQ_TAG_HEADERS_H #define ZEROMQ_TAG_HEADERS_H +#include "zmq_common_impl.h" #include <gnuradio/block.h> #include <gnuradio/io_signature.h> -#include <zmq.hpp> #include <cstring> #include <sstream> |