Jacques Germishuys
a1ace32650
Problem: TCP_NODELAY is set prior to connecting, which is problematic on Windows
...
Solution: Set TCP_NODELAY after connect()
Reference: https://mail.openvswitch.org/pipermail/ovs-dev/2014-October/290251.html
2018-12-14 11:49:05 +02:00
Henri Gourvest
a6b5c75198
Problem: Switching or desactivate wifi can lead to have EINVAL error code
...
returned on Android.
Solution: Avoid killing the application, allows to take
the appropriate measures to this situation.
2018-12-08 14:33:32 +01:00
Jérémie Courrèges-Anglas
70b48a9c0c
Problem: --version-script not used on OpenBSD
...
Solution: switch to libtool symbol visibility support, which leads to
more portable constructs in the autotools glue. As noted in the libtool
documentation "This option has no effect on some platforms."
After this commit, global symbols intended to be kept private will
disappear on platforms that were previously not handled
using -Wl,--version-script.
2018-12-07 18:58:19 +01:00
Luca Boccassi
f1dd84c11f
Problem: zmq_proxy STATISTICS eligible for stable
...
Solution: do it
2018-11-18 13:23:38 +00:00
Luca Boccassi
35c6985e68
Problem: zmq_stopwatch_intermediate is eligible for STABLE
...
Solution: do it
2018-11-18 13:23:38 +00:00
Luca Boccassi
22c3ecc458
Problem: some context options have no getter
...
Solution: add one so that class-based bindings can easily use them
2018-11-18 13:23:38 +00:00
Luca Boccassi
92cf6c6451
Problem: new ctx THREAD options are eligible for STABLE
...
Solution: do it
2018-11-18 13:23:38 +00:00
Luca Boccassi
c347aef794
Problem: new DRAFT monitoring events are eligible for STABLE
...
Solution: do it
2018-11-18 13:23:38 +00:00
Bill Torpey
25e069d131
Add specific option to select radix tree implementation for subscriptions ( #3304 )
...
* Add specific option to select radix tree implementation for subscriptions (defaults to ON if draft API enabled).
2018-11-12 21:57:11 +00:00
Shubham Lagwankar
3659c1204a
Problem: radix tree needs benchmarks and improvements ( #3290 )
...
* Problem: radix tree needs benchmarks and improvements
Solution: add a benchmark and make suggested improvements
2018-11-09 10:49:40 +00:00
KIU Shueng Chuan
9a15fe7fac
use required number of descriptors (1) instead of FD_SETSIZE
2018-11-07 09:58:16 +08:00
Luca Boccassi
63abe83388
Merge pull request #3296 from sigiesec/reapply-session-base-refactoring
...
Reapply session_base_t refactoring
2018-11-06 21:00:26 +00:00
Simon Giesecke
db09fab47b
Problem: compilation broken with Sun Studio
...
Solution: do not use make_pair
2018-11-06 12:33:19 +01:00
Nathan Toone
fa598579e6
Problem: Assert being triggered when Windows returns WSAENOBUFS
from recv
call on large buffers.
...
Solution: Expect `WSAENOBUFS` as a valid response. See https://github.com/zeromq/libzmq/issues/3263
2018-11-05 16:25:35 -07:00
Simon Giesecke
c590873ff7
Problem: complexity of start_connecting
...
Solution: extract functions for each protocol
2018-11-05 16:06:21 +01:00
Luca Boccassi
25ded9e897
Problem: out-of-date TODO in zmq_poll
...
Solution: remove it
2018-11-05 10:59:12 +00:00
Luca Boccassi
ab1607f813
Problem: poller implementation of zmq_poll is slow
...
Solution: use it only if there is at least one thread-safe socket,
which is not compatible with the older zmq_poll implementation.
2018-11-05 10:59:12 +00:00
Luca Boccassi
bd9011fe3b
Problem: build broken with Sun Studio
...
Solution: temporary revert refactoring until it can be properly fixed.
Revert "Problem: complexity of start_connecting"
This reverts commit 6d7aeb056f11e6fd2429fa90bc175da0922d306b.
2018-11-05 10:58:45 +00:00
Luca Boccassi
8f69122981
Problem: new radix tree implementation is experimental
...
Solution: use it only for DRAFT builds for now, to leave it time to be
tested and stabilised.
2018-10-31 14:47:57 +00:00
Shubham Lagwankar
c68afb412e
Problem: potentially large memory footprint of trie as number of
...
subscriptions increases
Solution: use a radix tree instead of a trie to store subscriptions
2018-10-31 07:49:55 -04:00
Bunjevacki, Jovan
f5d1d5d1af
Problem: Use of pipe_t after free in zmq::socket_base_t::term_endpoint(). Issue #3245 .
...
Solution: When pipe_t is freed (terminated) remove it from _endpoints member of zmq::socket_base_t. Resolves issue #3245 .
2018-10-30 14:12:29 +01:00
Conrad Parker
22083d7d62
Problem: UDP does not support ZMQ_MULTICAST_HOPS
...
Solution: add support for ZMQ_MULTICAST_HOPS (IP_MULTICAST_TTL)
2018-10-30 08:14:26 +00:00
Luca Boccassi
cfc9d5f519
Problem: trailing whitespace breaks clang-format-check
...
Solution: fix issue introduced by #3270
2018-10-08 17:17:13 +01:00
gabm
c1ac158f50
Problem: The flag that indicates the next expected message gets set even if the send fails ( #3270 )
...
* ZMQ_DGRAM: flip more flag after successful send
In the dgram socket we have a flag that indicates the next expected message type to ensure that always a pair of "address" + "body" messages gets sent. The first one MUST have the sendmore flag, the second MUST NOT.
In case the message does not get sent because of HWM full, then the function returns EAGAIN as it should. But unfortunately the next expected message type-flag gets flipped as well. When the socket_base::send function now tries to resend the message, it became the wrong message type... If you don't stop sending pairs of messages here (like me) then the next message that gets through will be of the wrong type, which in turn crashes the udp_engine function as described in #3268
2018-10-08 17:14:45 +01:00
Gregory Lemercier
ffe62d3398
Fix build on arm64 architectures with some strict compilers
...
This patch fixes an issue that occurs on 64-bit architetures under
strict compiler rules. The code initially checked that the received
size stored in 'uint64_t' was not bigger than the max value of a
'size_t' variable, which is legitimate on 32-bit architectures where
'size_t' variables are stored on 32 bits. On 64-bit architectures,
this test no longer makes sense since 'uint64_t' and 'size_t' types
have the same size. The issue is fixed by ignoring this portion
of code when built for arm64.
2018-10-07 18:23:08 +02:00
Luca Boccassi
e0ec6a9b36
Problem: formatting errors introduced by PR #3237
...
Solution: fix them
2018-08-31 09:37:53 +01:00
Byron Mallett
d8f3b283f8
Added SO_REUSEPORT socket option for UDP recv ports ( #3237 )
...
* Added SO_REUSEPORT socket option for UDP multicast recv ports
2018-08-31 09:36:34 +01:00
Aalhad Saraf
3f1f628538
Fix build failure on ARM due to bad variable name
...
The variable decrement was changed to decrement_
in c581f43c977f8776a56d20b7654260928e4c16b8
In -one- place, it remained as decrement
and gives:
In file included from src/ctx.hpp:44:0,
from src/address.cpp:33:
src/atomic_counter.hpp: In member function 'bool zmq::atomic_counter_t::sub(zmq::atomic_counter_t::integer_t)':
src/atomic_counter.hpp:191:28: error: 'decrement' was not declared in this scope
Changing it to decrement_ fixes the problem.
2018-08-23 17:02:56 +05:30
Luca Boccassi
9f0b83a1d3
Problem: whitespace issue with PR #3227
...
Solution: fix it to comply with clang-format rules
2018-08-20 15:44:20 +01:00
answeroo
777bd48296
Pgm fix ( #3227 )
...
* Relicensing grant by Ming Ji <jiming@yafco.com>
Permission to relicense under any OSI approved license chosen by the current ZeroMQ BDFL.
2018-08-20 15:42:58 +01:00
Luca Boccassi
d7e51cdfed
Problem: indentation issues with PR #3226
...
Solution: fix them
2018-08-19 18:12:28 +01:00
answeroo
7852a6ce98
PGM receiver crash fix ( #3226 )
...
Problem: PGM receiver can crash due to race
Solution: do not run in_event until restart_input finishes correctly.
Signed-off-by: answeroo <jiming@yafco.com>
2018-08-19 18:10:51 +01:00
Simon Giesecke
8328208e60
Problem: inconsistent _out_pipes when using the same routing id without ZMQ_ROUTER_HANDOVER
...
Solution: added test case, do not erase existing without ZMQ_ROUTER_HANDOVER
2018-08-17 12:50:59 +02:00
Simon Giesecke
6d7aeb056f
Problem: complexity of start_connecting
...
Solution: extract functions for each protocol
2018-08-15 14:46:21 +02:00
Simon Giesecke
2cd34da1b0
Problem: code duplication in session_base_t::start_connecting
...
Solution: extract common code
2018-08-15 14:46:21 +02:00
Simon Giesecke
799fae44fe
Problem: magic literal used for inproc
...
Solution: define and use named constant
2018-08-15 14:46:21 +02:00
Simon Giesecke
daadb65a46
Problem: inconsistency of using terms address and uri
...
Solution: use terms more consistently
2018-08-15 14:46:21 +02:00
Simon Giesecke
cdc6c66f9b
Problem: complexity of term_endpoint
...
Solution: extract resolve_tcp_addr function
2018-08-15 14:46:21 +02:00
Simon Giesecke
a2d736c14f
Problem: functionality around inprocs_t is scattered
...
Solution: extract into functions of new inprocs_t class
2018-08-15 14:46:21 +02:00
Simon Giesecke
fb576d2f95
Problem: unnecessary procedural code
...
Solution: replace by functional expression
2018-08-15 14:46:21 +02:00
Simon Giesecke
3455be144d
Problem: code duplication around sending of routing id
...
Solution: extract functionality into send_routing_id
2018-08-15 14:46:21 +02:00
Simon Giesecke
83f41526c9
Problem: code duplication around options_t::conflate
...
Solution: extract functionality into get_effective_conflate_option
2018-08-15 12:18:35 +02:00
Simon Giesecke
8820dedcb7
Problem: stream_engine_t::_as_server is not used
...
Solution: remove it
2018-08-15 11:53:31 +02:00
Simon Giesecke
0852099f67
Problem: unused field pipe_t::_credentials
...
Solution: remove it
2018-08-15 11:48:00 +02:00
Szekely Gyorgy
2cdad3d0ce
Add ZMQ_ROUTER_NOTIFY draft socket option ( #3213 )
...
* Add ZMQ_ROUTER_NOTIFY draft socket option
2018-08-15 08:54:08 +01:00
Simon Giesecke
da30ff7d3d
Problem: unused get_credential methods and associated fields
...
Solution: remove them
2018-08-13 15:22:18 +02:00
Luca Boccassi
0b1589dbba
Merge pull request #3209 from sigiesec/code-improvements
...
Code style improvements
2018-08-10 16:40:23 +01:00
Simon Giesecke
bbae67df89
Code style improvements
2018-08-10 15:36:31 +02:00
Simon Giesecke
b102e30419
Fixed naming for filter parameter, removed unnecessary temporary variable, fixed naming of local variable
2018-08-10 11:25:20 +02:00
Simon Giesecke
a1b6268c83
Made to_string const; converted C-style cast to reinterpret_cast
2018-08-10 11:25:09 +02:00
Luca Boccassi
6e8424ab5d
Merge pull request #3206 from sigiesec/fix-zap-memory-use-after-free
...
Problem: stream_engine_t instance may access its fields after it deleted itself
2018-08-09 18:17:58 +01:00
Simon Giesecke
737927e333
Fixed spelling of parameter
2018-08-09 18:27:01 +02:00
Simon Giesecke
46ed0920b2
Various code style improvements
2018-08-09 18:27:01 +02:00
Simon Giesecke
563651e0c9
Problem: stream_engine_t instance may access its fields after it deleted itself
...
Solution: prevent access to data if the object was deleted
2018-08-09 15:24:23 +02:00
Simon Giesecke
be81dcd4d3
Use std::min/max where possible
2018-08-09 12:53:32 +02:00
Simon Giesecke
3cb77e423e
Use revision_pos constant
2018-08-09 12:47:18 +02:00
Simon Giesecke
758f903db4
Some code style improvements: removed redundant parentheses, added const, joined declaration and assignment of local variables
2018-08-09 12:41:08 +02:00
Simon Giesecke
89e5313114
Refactored zmq::stream_engine_t::handshake, extracted several sub-methods
2018-08-09 12:41:08 +02:00
Simon Giesecke
c3739ff604
Use static_cast instead of C-style casts, make local variables const where possible, use switch instead of chained if/else, extract rm_helper_multiple_subnodes from rm_helper to reduce nesting
2018-08-09 12:41:08 +02:00
Simon Giesecke
9e2cf35b66
Reduced number of calls to container end method
2018-08-09 12:41:08 +02:00
Simon Giesecke
19a70ab682
Optimized and simplified zmq::timers_t::execute and zmq::timers_t::timeout
2018-08-07 16:54:35 +02:00
Simon Giesecke
4f77cfa327
Removed unreachable code paths
2018-08-07 16:11:52 +02:00
Simon Giesecke
198c01e00b
Use more structured for loop instead of while loop
2018-08-07 15:58:15 +02:00
Simon Giesecke
e4b4372c41
Simplified code
2018-08-07 14:15:35 +02:00
Simon Giesecke
ad3d1e7762
Reduced code duplication between xread and xhas_in
2018-08-07 14:15:35 +02:00
Simon Giesecke
3cca90ea44
Optimized zmq::dish_t::xhas_in
2018-08-07 14:15:35 +02:00
Simon Giesecke
aa1f5739b7
Optimized zmq::dish_t::xrecv
2018-08-07 14:15:35 +02:00
Simon Giesecke
fa976f87f9
Simplified uses of erase
2018-08-07 14:15:35 +02:00
Simon Giesecke
6357890ff6
Removed code duplication in process_commands
2018-08-07 10:17:12 +02:00
Luca Boccassi
3159161cef
Problem: zmq_timers_* are ready for STABLE
...
Solution: move them from DRAFT state to STABLE
2018-07-27 23:07:56 +01:00
Michael Vilim
8a16fef3cc
Problem: ZMQ_CONNECT_ROUTING_ID can be assigned to incoming socket connection (Issue #3191 )
...
Solution: Add an identifier parameter for local attach to zmq::socket_base_t::attach_pipe
2018-07-26 18:26:35 -05:00
Alessio M
9066e0670f
Problem: stack overflow on win64 #2876 . Basically zmq::signaler_t::wait suffers from stack bloating the same way socket_poller was found to be bloated due to the large size of fd_set
...
Solution: replace the fd_set in the routine with an instance of optimized_fd_set_t
2018-06-28 14:11:32 +01:00
Luca Boccassi
b0d9a5a2d5
Merge pull request #3174 from ilue/master
...
Fix for issue #3162
2018-06-26 08:09:05 +01:00
Luca Boccassi
d70714e877
Problem: can't process ZMTP 3.1 cancel/subscribe commands
...
Solution: add some msg helpers to parse commands, and check for
subscribe or cancel commands and process them accordingly in the xpub
and xsub classes.
2018-06-23 17:16:10 +01:00
Luca Boccassi
8da4e9b95c
Problem: pgm_sender does not initialise all its class variables
...
Solution: do it to silence static analysis warnings
2018-06-22 22:49:58 +01:00
ehilscher
0867c38032
Problem: connecter classes do not handle ZMQ_RECONNECT_IVL of -1 ( #3163 )
...
* Problem: connecter classes do not handle ZMQ_RECONNECT_IVL of -1
Solution: Add guards to prevent a reconnect timer from starting if ZMQ_RECONNECT_IVL is -1
(Issue 3158)
2018-06-12 23:23:39 +01:00
ilue
e22cd678b6
Fix #3162
2018-06-12 11:10:03 +08:00
Luca Boccassi
3a1e8f0704
Merge pull request #3159 from sigiesec/remove-superfluous-mutex
...
Problem: epoll_t employs an unnecessary mutex
2018-06-07 14:17:20 +01:00
Simon Giesecke
75e945f162
Problem: epoll_t employs an unnecessary mutex
...
Solution: remove the mutex
2018-06-06 21:41:16 +02:00
KIU Shueng Chuan
5a1ea0c398
Problem: ZMQ_USE_EPOLL_CLOEXEC not renamed to new name
...
Solution: rename it
2018-06-04 23:17:57 +08:00
pijyoi
c76ac5474b
fix computation of winsock fd_set size ( #3151 )
...
* fix computation of winsock fd_set size
2018-06-02 13:16:33 +01:00
Simon Giesecke
5ac900a984
Problem: huge size of socket_poller_t object on Windows with select polling
...
Solution: use resizable_optimized_fd_set_t
2018-06-01 18:43:58 +02:00
Simon Giesecke
4a651251a7
Problem: code duplication within socket_poller_t
...
Solution: remove duplicated code
2018-06-01 18:24:42 +02:00
Simon Giesecke
74d3d8421f
Problem: huge stack allocation with select on Windows in socket_poller_t::wait
...
Solution: use optimized_fd_set_t
2018-06-01 18:22:49 +02:00
Simon Giesecke
3d39bb9ca9
Problem: valid_pollset_bytes not reused in socket_poller
...
Solution: use it
2018-06-01 18:22:49 +02:00
Simon Giesecke
a8d62d14c1
Problem: polling utilities not at a reusable location
...
Solution: move to separate header
2018-06-01 18:22:48 +02:00
Simon Giesecke
7c0efcb588
Problem: huge stack allocation in Windows select code
...
Solution: use fast_vector_t as in poll implementation
2018-06-01 18:20:10 +02:00
Simon Giesecke
2533ffed86
Problem: memcpy code fragment is duplicated
...
Solution: unify between Windows and non-Windows code
2018-06-01 18:19:46 +02:00
Simon Giesecke
04dedfbc2a
Problem: duplicated calculation of valid bytes in select pollset
...
Solution: extract to function
2018-06-01 18:16:46 +02:00
Simon Giesecke
e4c3297ed8
Problem: fragile handling of possibly dynamically allocated pollfds
...
Solution: extract class template fast_vector_t
2018-06-01 17:08:39 +02:00
Simon Giesecke
c6e4b0abb1
Problem: zmq_poll implementation is complex
...
Solution: extract compute_timeout method
2018-06-01 17:08:38 +02:00
Simon Giesecke
3db3bbfbbb
Problem: duplication in implementation zmq_poller_poll
...
Solution: remove duplication
2018-06-01 17:08:38 +02:00
Simon Giesecke
4604014c12
Problem: unused result of call to pull_msg
...
Solution: add TODO comment regarding handling of the result
2018-05-31 11:21:33 +02:00
Simon Giesecke
c2ba553d87
Problem: unused values stored to variable, duplicated code
...
Solution: remove duplicated and redundant code
2018-05-31 11:02:26 +02:00
Simon Giesecke
ee4cdf8bf0
Problem: suspicious use of memcmp result
...
Solution: explicitly compare result against 0
2018-05-31 11:02:26 +02:00
Simon Giesecke
a2f91c5509
Problem: unnecessary passing of non-const data
...
Solution: make const
2018-05-30 23:21:53 +02:00
Simon Giesecke
c641644bb2
Problem: inconsistent parameter names
...
Solution: harmonize
2018-05-30 23:21:52 +02:00
Simon Giesecke
9e6f1c9a3c
Problem: redundant else after return
...
Solution: remove redundant else
2018-05-30 23:21:52 +02:00
Simon Giesecke
6fa12bd692
Problem: unused stored value warning
...
Solution: add LIBZMQ_UNUSED
2018-05-30 23:21:52 +02:00
Simon Giesecke
0f2979a38e
Problem: assignment used as condition warning
...
Solution: changed condition
2018-05-30 23:21:52 +02:00