From aa80a7739e6885441724a776870d1b9de0183da0 Mon Sep 17 00:00:00 2001 From: Johannes Schmitz <schmitz@ti.rwth-aachen.de> Date: Fri, 9 May 2014 17:29:50 +0200 Subject: zeromq: Change the value of the poll timeout according to the zmq version. Must be in microseconds for version 2 and below and in milliseconds for version 3 and above. --- gr-zeromq/lib/req_source_impl.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gr-zeromq/lib/req_source_impl.cc') diff --git a/gr-zeromq/lib/req_source_impl.cc b/gr-zeromq/lib/req_source_impl.cc index 3cbe6edbf1..2e40a2e97d 100644 --- a/gr-zeromq/lib/req_source_impl.cc +++ b/gr-zeromq/lib/req_source_impl.cc @@ -43,6 +43,11 @@ namespace gr { gr::io_signature::make(1, 1, itemsize * vlen)), d_itemsize(itemsize), d_vlen(vlen), d_timeout(timeout) { + int major, minor, patch; + zmq::version (&major, &minor, &patch); + if (major < 3) { + d_timeout = timeout*1000; + } d_context = new zmq::context_t(1); d_socket = new zmq::socket_t(*d_context, ZMQ_REQ); int time = 0; -- cgit v1.2.3