Simon Giesecke
3cbc7cb0dc
Problem: C4244 warnings regarding SOCKET vs. int in test_security_null and test_security_plain
...
Solution: Use fd_t
2018-05-14 21:09:56 +02:00
Simon Giesecke
3ee65906af
Problem: various warnings regarding SOCKET vs. int in test_security_curve
...
Solution: Use fd_t
2018-05-14 21:09:56 +02:00
Simon Giesecke
28631d1cd3
Problem: C4550 warning in testutil_security
...
Solution: explicitly compare function pointer against NULL
2018-05-14 19:18:43 +02:00
Simon Giesecke
b0c3a42ed2
Problem: C4800 warnings in unittest_ip_resolver.cpp
...
Solution: make proper boolean expression
2018-05-14 19:18:42 +02:00
Simon Giesecke
c589f2b603
Problem: C4800 warning in socket_base.cpp
...
Solution: make proper boolean expression
2018-05-14 19:18:37 +02:00
Simon Giesecke
c52871f82c
Problem: C4627 warning in proxy.cpp and signaler.cpp
...
Solution: move conditional include directive to precompiled.hpp
2018-05-14 18:07:13 +02:00
Simon Giesecke
a8095a1046
Problem: C4800 warning in ip_resolver.cpp
...
Solution: fix type specification
2018-05-14 18:07:13 +02:00
Simon Giesecke
95c770a275
Problem: C4099 warning in udp_engine.cpp
...
Solution: fix type specification
2018-05-14 17:17:11 +02:00
Simon Giesecke
d7e99085ef
Problem: Warnings in Windows builds
...
Solution: enable warnings-as-errors
2018-05-14 17:17:10 +02:00
Simon Giesecke
8ad43907e6
Merge pull request #3101 from bluca/heartbeat_disabled
...
Problem: heartbeat tests are disabled
2018-05-14 15:05:29 +02:00
Luca Boccassi
eac265059d
Problem: heartbeat tests are disabled
...
Solution: re-enable them
2018-05-14 13:41:39 +01:00
Luca Boccassi
54aff77475
Merge pull request #3096 from sigiesec/add-poller-docs
...
Add poller docs
2018-05-14 11:10:10 +01:00
Simon Giesecke
4fea7184dc
Problem: man zmq_poller_* not working
...
Solution: add symlinks to zmq_poller.txt
2018-05-14 11:29:24 +02:00
Simon Giesecke
f4b1cae082
Problem: no documentation for zmq_poller_*
...
Solution: add initial documentation
2018-05-14 11:29:24 +02:00
Simon Giesecke
213254cca5
Problem: inconsistent behaviour of zmq_poller_new in case of memory exhaustion
...
Solution: return NULL and set errno to ENOMEM
2018-05-14 11:29:24 +02:00
Simon Giesecke
2cd147e5ff
Problem: misleading comment for calling zmq_poller_add with events == 0
...
Solution: change comment, and add test case for zmq_poller_modify with events == 0
2018-05-14 11:29:24 +02:00
Simon Giesecke
00d25b7873
Problem: inconsistent behaviour of zmq_poller_add and zmq_poller_add_fd in case of memory exhaustion
...
Solution: always return -1 with errno == ENOMEM
2018-05-14 11:29:24 +02:00
Luca Boccassi
0a037a7431
Merge pull request #3097 from sigiesec/ping-context
...
ZMTP 3.1 PING Context not implemented
2018-05-14 09:55:41 +01:00
Simon Giesecke
be66eacf5c
Problem: test_heartbeats still using plain assertions
...
Solution: migrate to unity assertions
2018-05-14 10:14:32 +02:00
Luca Boccassi
b331caad06
Problem: ZMTP 3.1 PING Context not implemented
...
Solution: if a PING message contains a context, echo it back in the
PONG message. In order to do so, create the PONG message when PING
is received and store it in the engine.
After the PING the engine goes straight to encoding and sending, so
there can always be at most one pending PING.
Add tests for various contexts.
2018-05-14 10:14:13 +02:00
Luca Boccassi
5482b1ca45
Problem: heartbeat command parsing does not check command name size
...
Solution: treat the first byte of the command body as the size of the
command name, rather than as an id, to comply with ZMTP 3.1.
This was not an actual problem at runtime since both heartbeat
commands have a size of 4, which was treated like an id.
But once SUBSCRIBE/UNSUBSCRIBE get implemented it needs to be checked.
2018-05-14 09:15:39 +02:00
Luca Boccassi
ba9274c39a
Problem: test_heartbeats mocked ZMQ_REP is hacky and fragile
...
Solution: remove it, it doesn't add much value anyway
2018-05-14 09:15:38 +02:00
Simon Giesecke
f218478237
Problem: test_heartbeats use no test framework
...
Solution: migrate to unity
2018-05-14 09:15:38 +02:00
Simon Giesecke
df2fe88b92
Merge pull request #3095 from bluca/sunstudio_linux
...
Problem: building on Linux with Sun Studio still fails
2018-05-13 21:21:50 +02:00
Luca Boccassi
09f700f72e
Problem: uninitialised class variable warning
...
Solution: initialise it
2018-05-13 18:24:50 +01:00
Luca Boccassi
7ba074fa28
Problem: Sun Studio build errors
...
Solution: add compiler flags to support extensions like anonymous
structs in unions, fix casting of const, and check for suncc rather
than solaris
2018-05-13 18:24:50 +01:00
Simon Giesecke
cdb54d248b
Merge pull request #3094 from simias/mcast-if
...
Problem: no way to specify source interface for UDP multicast sender …
2018-05-13 18:47:59 +02:00
Lionel Flandrin
a833ace204
Problem: no way to specify source interface for UDP multicast sender sockets
...
Solution: if a binding interface is provided in the sender URL we pass
it to IP[V6]_MULTICAST_IF setsockopt
2018-05-13 18:32:12 +02:00
Luca Boccassi
f6e528443e
Merge pull request #3093 from simias/fix-aliasing
...
Problem: test_radio_dish triggers aliasing errors with some compilers
2018-05-13 16:31:49 +01:00
Lionel Flandrin
4eb6786347
Problem: test_radio_dish triggers aliasing errors with some compilers
...
Solution: refactor the test code to work around aliasing issues
2018-05-13 17:05:05 +02:00
Simon Giesecke
21f642fa4f
Merge pull request #3092 from bluca/solaris_studio
...
Problem: build broken on Solaris with Sun Studio compilers
2018-05-13 15:05:16 +02:00
Luca Boccassi
c5b7f4f536
Problem: test_system info output hidden on Solaris
...
Solution: change the ifdef to always print on any Unix, as they
all have ulimit
2018-05-13 13:19:07 +01:00
Luca Boccassi
510a42c3d5
Problem: test_system fails on Solaris due to lower file limit
...
Solution: use a different max socket value on Solaris, where the
default limit is 256 instead of 1024
2018-05-13 13:18:08 +01:00
Luca Boccassi
b78cfb2395
Problem: mismatching declarations and definitions break Solaris Studio build
...
Solution: add missing const qualifier to internal functions
2018-05-13 13:17:20 +01:00
Luca Boccassi
8b82ed50a2
Problem: Solaris Studio does not convert from char * to string
...
Solution: do it explicitly to fix build on Solaris 10/11 with the Sun
compiler
2018-05-13 13:16:37 +01:00
Simon Giesecke
3d9c119543
Problem: compilation broken on Solaris
...
Solution: remove constness on pair arguments. Fixes #3090
2018-05-13 13:15:32 +01:00
Luca Boccassi
15e8de2f88
Merge pull request #3091 from sigiesec/fix-warnings-msvc
...
Problem: warnings in MSVC builds around size_t/int
2018-05-13 12:11:05 +01:00
Simon Giesecke
d6433b5c24
Problem: warnings in MSVC builds around size_t/int
...
Solution: use proper types
2018-05-13 11:11:19 +02:00
Simon Giesecke
5fe783070b
Merge pull request #3085 from bluca/getrandom_test
...
Problem: getrandom test does not check if it's working
2018-05-11 09:51:43 +02:00
Luca Boccassi
0f896fcd36
Merge pull request #3087 from simias/mcast_loop
...
Problem: ZMQ doesn't expose the MULTICAST_LOOP socket option
2018-05-10 19:10:28 +01:00
Lionel Flandrin
4b635c3d06
Problem: documentation for zmq_udp is outdated
...
Solution: update to document new binding options and IPv6 support
2018-05-10 19:24:48 +02:00
Lionel Flandrin
99412c810d
Problem: ZMQ doesn't expose the MULTICAST_LOOP socket option
...
Solution: add a new ZMQ_MULTICAST_LOOP option for UDP sockets.
2018-05-10 19:24:46 +02:00
Luca Boccassi
e9211aed2c
Merge pull request #3086 from simias/warning-fix
...
Problem: test helper recv_string_expect_success ignores flags
2018-05-10 11:15:01 +01:00
Lionel Flandrin
f9c30f3e19
Problem: test helper recv_string_expect_success ignores the flags argument
...
Solution: pass the flags to zmq_recv
2018-05-10 11:43:47 +02:00
Luca Boccassi
3c2656eb52
Merge pull request #3081 from simias/udp_ipv6
...
UDP Ipv6 support
2018-05-09 13:01:06 +01:00
Lionel Flandrin
b0df4be51c
Problem: UDP engine does not support IPv6
...
Solution: Add IPv6 support
2018-05-09 12:06:23 +02:00
Luca Boccassi
4ff814f204
Problem: getrandom test does not check if it's working
...
Solution: check return value in autoconf and CMake. On some platforms
the function is available but not implemented (eg: GNU/Hurd).
2018-05-09 10:41:20 +01:00
Luca Boccassi
7aba6821ac
Merge pull request #3084 from jorikcaljouw/new_fix_vs2015
...
Add ip_resolver.cpp and ip_resolver.hpp for vs2015 libzmq project
2018-05-08 13:17:33 +01:00
Jorik Caljouw
45b0ff59ff
Add ip_resolver.cpp and ip_resolver.hpp for vs2015 libzmq project
2018-05-08 14:04:05 +02:00
Constantin Rack
b9ba36389d
Merge pull request #3083 from asafkahlon/master
...
acinclude.m4: check if -latomic is needed.
2018-05-07 22:25:41 +02:00
Asaf Kahlon
2ec5a33f6e
acinclude.m4: check if -latomic is needed.
...
On some cases, -latomic is needed for likning, and since the current
acinclude.m4 checks only compilation we can sometimes miss the need for -latomic
and the linking process will fail.
Therefore, the AC_CHECK_IFELSE was replaced with AC_LINK_IFELSE. If the first
try fails, we try to link again with -latomic and add LIBS="-latmoic" in case we
succeeded.
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
2018-05-07 22:02:25 +03:00
Luca Boccassi
363fa7892d
Merge pull request #3078 from simias/mcast_bind
...
Mcast bind
2018-05-04 14:22:53 +01:00
Lionel Flandrin
746d4a0f5e
Problem: UDP transport doesn't let the user specify the local bind address
...
for multicast
Solution: augment the UDP URL syntax to accept an interface specifier with a
syntax similar to the PGM urls.
Fixes #2212
2018-05-04 14:36:18 +02:00
Lionel Flandrin
524affc4c3
Problem: UDP address parser uses ad hoc code to detect multicast address
...
Solution: factor the code into ip_resolver, add IPv6 support and unit tests.
2018-05-04 10:44:01 +02:00
Luca Boccassi
1bb1029bd1
Merge pull request #3075 from simias/udp_parser
...
Udp parser
2018-05-03 14:40:37 +01:00
Lionel Flandrin
2dc8579412
Problem: the UDP address code uses an ad hoc custom parser
...
Solution: replace it with the ip_resolver code shared with the TCP
address code
It simplifies the UDP parsing code and makes it behave more like the
TCP counterpart, in particular it's not possible to connect to hosts
by name and bind by NIC names.
It also adds support for "*" port resolving to 0 (useful to let the OS
allocate the port number).
2018-05-03 14:22:48 +02:00
Lionel Flandrin
0b36b84243
Problem: no unit tests for udp_address.cpp
...
Solution: add unit tests
2018-05-03 14:22:42 +02:00
Luca Boccassi
801559c504
Merge pull request #3077 from simias/port_check
...
Problem: ip_resolver allows wildcard ports for non-bindable sockets
2018-05-03 13:07:37 +01:00
Lionel Flandrin
406c348771
Problem: ip_resolver allows wildcard ports for non-bindable sockets
...
Solution: return an error in this situation but still allow using an explicit
"0" if somebody really wants to connect to port 0.
This shouldn't break any existing code because a "*" port was already rejected
in an early test in the TCP path in zmq::socket_base_t::connect.
2018-05-03 13:19:22 +02:00
Luca Boccassi
889ac2eb3d
Merge pull request #3074 from simias/author
...
Add me to AUTHORS + RELICENSE file
2018-05-02 18:27:27 +01:00
Lionel Flandrin
e027c80ed3
Added simias.md to RELICENSE
2018-05-02 19:24:20 +02:00
Lionel Flandrin
142ee305e7
Add Lionel Flandrin to AUTHORS
2018-05-02 19:24:07 +02:00
Luca Boccassi
5f7c9c43f5
Merge pull request #3070 from simias/ip_refactor_clean
...
Problem: address parsing code is tied to the TCP code
2018-05-02 18:05:06 +01:00
Lionel Flandrin
4cd2c2ebf8
Problem: address parsing code is tied to the TCP code
...
Solution: Factor the code into a different file with a well defined API and add
unit tests.
2018-05-02 18:06:01 +02:00
Simon Giesecke
6160da5dbe
Merge pull request #3068 from bluca/appveyor_cache
...
More attempts to speed up Appveyor
2018-04-30 20:21:54 +02:00
Luca Boccassi
578c255f4f
Problem: Appveyor VS 2015/17 images are single-core
...
Solution: use 2013 images for all builds bar 2, to test newer versions
2018-04-30 16:29:16 +01:00
Luca Boccassi
2af2701ba6
Problem: Appveyor rebuilds libsodium every time
...
Solution: cache the git repository and build directory
2018-04-29 22:41:39 +01:00
Luca Boccassi
09d951ada3
Problem: Appveyor runs test sequentially
...
Solution: add -j flag to run them in paralle, cuts test runtime
from ~80 to ~20 seconds
2018-04-29 22:14:05 +01:00
Luca Boccassi
e5eab4b91f
Problem: CMake parallel build not enabled for C files
...
Solution: set the equivalent flag
2018-04-29 22:14:05 +01:00
Luca Boccassi
5210fa4e8d
Merge pull request #3066 from AxelNennker/patch-3
...
Update android_build_helper.sh
2018-04-29 17:19:08 +01:00
Luca Boccassi
d47726ae41
Merge pull request #3065 from AxelNennker/patch-2
...
Update README.md
2018-04-29 17:00:28 +01:00
Axel Nennker
1d25658332
Update android_build_helper.sh
...
Minimum platform for arm is android-14
2018-04-29 17:56:16 +02:00
Axel Nennker
d36c1ca5e0
Update README.md
...
added missing = to export VARIABLE=VALUE
2018-04-29 17:52:31 +02:00
Luca Boccassi
9e4447f8e6
Merge pull request #3064 from AxelNennker/patch-1
...
use HTTPS when downloading a binary before excuting it check hashes
2018-04-29 16:19:49 +01:00
Axel Nennker
990268e1db
use HTTPS when downloading a binary before excuting it check hashes
...
Changed the download URL to use HTTPS.
Provided the hashes for version r10e
Replaces /home/zmq by $HOME
2018-04-29 17:18:38 +02:00
Doron Somech
046689bbe7
Merge pull request #3063 from bluca/heartbeat
...
Problem: heartbeat commands break REP session, unclear documentation
2018-04-28 18:41:46 +03:00
Luca Boccassi
4a4c6c27e4
Problem: heartbeat tests only cover ROUTER/DEALER
...
Solution: check more socket type to cover other session managers.
Increase timeout as the test now takes ~12 seconds.
2018-04-28 15:49:54 +01:00
Luca Boccassi
cae6434345
Problem: HEARTBEAT command breaks REQ connection
...
Solution: ignore command messages in the REQ session to avoid
disrupting the state machine.
Commands are handled by the engine before handing off to the session.
2018-04-28 15:25:24 +01:00
Luca Boccassi
cdf5566108
Problem: default ZMQ_HEARTBEAT_TIMEOUT when enabled not documented
...
Solution: mention in manpage that if the timeout is not set and the
interval is, the timeout will be equal to the interval
2018-04-28 11:47:21 +01:00
Luca Boccassi
55be8f1c2f
Merge pull request #3058 from dwijnand/patch-1
...
Fix formatting in CONTRIBUTING
2018-04-27 18:06:05 +01:00
Dale Wijnand
e6dc9605a5
Fix formatting in CONTRIBUTING
...
Avoids the git instructions being all on one line.
2018-04-27 17:57:07 +01:00
Luca Boccassi
69a894e1cb
Merge pull request #3055 from dennisklein/master
...
Install relocatable dylibs (MacOS)
2018-04-25 19:47:22 +01:00
Dennis Klein
0dda63660e
Install relocatable dylibs (MacOS)
...
Problem: When building libzmq with CMake, the installed libzmq.dylib
has a relative install name (otool -D libzmq.dylib) on MacOS. This
is a regression against building via autotools which sets an
absolute install name. Effectively, the CMake built libzmq.dylib
is rendered useless if installed in non-system directories and
used in environments without explicit DYLD_LIBRARY_PATH mgmt. For
example running any of the installed executables currently fails:
$ /some_install_prefix/bin/inproc_lat
dyld: Library not loaded: libzmq.5.dylib
Referenced from: /some_install_prefix/bin/inproc_lat
Reason: image not found
Trace/BPT trap: 5
Solution: Best practice is to install relocatable dylibs.
On MacOS this means setting an install name with a special prefix,
e.g. @rpath/libzmq.dylib, and adding the relevant search paths
to the embedded rpath list. In this patch the necessary CMake options
are added to generate the desired relocatable dylibs. Find more
information on: https://cmake.org/Wiki/CMake_RPATH_handling .
2018-04-25 20:18:42 +02:00
Doron Somech
7f230b12fe
Merge pull request #3053 from bluca/draft_doc
...
Problem: Server-client not marked as DRAFT in manpage
2018-04-23 20:17:10 +03:00
Luca Boccassi
c027255329
Problem: Server-client not marked as DRAFT in manpage
...
Solution: add note like for radio-dish
Fixes : #3050
2018-04-23 18:13:16 +01:00
Luca Boccassi
54fd20afdf
Merge pull request #3049 from maksqwe/fix_fd_cast
...
Fix fd_t variable casting on Windows platform
2018-04-19 11:04:04 +01:00
Maks Naumov
989dfc7801
Fix fd_t variable casting on Windows platform
...
event_accepted() already accepts fd_t type and there is no reason to cast it to int type
Moreover, on Windows x64 this leads to truncation memsize -> int
2018-04-19 12:38:06 +03:00
Luca Boccassi
c971445025
Merge pull request #3045 from asafkahlon/fix-configure-dladdr-check
...
configure.ac: serach for dladdr only on libunwind
2018-04-14 21:13:05 +01:00
Asaf Kahlon
ce2f87970d
configure.ac: serach for dladdr only on libunwind
...
The original configure.ac tries to check for dladdr, but it actually needs
it only in case we have libunwind (which has a another section and checks for it
too).
This can fail the build on systems without dynamic linking support.
Therefore, the dladdr check has to be preformed only when checking libunwind.
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
2018-04-14 22:29:49 +03:00
asafkahlon
8e8009ec5d
Implement the wsa_error_no function with switch-case ( #3044 )
...
* Implement the wsa_error_no function with switch-case
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
2018-04-13 15:16:54 +01:00
Steffen Wittmeier
bb4fb32925
CMake: Linker PDB install rule does not work when Visual Studio generators are used ( #3040 )
...
* Fixes issues with the PDB install rule for VS solutions
* Fix for compile PDB and linker PDB under Windows
2018-04-04 10:48:36 +01:00
Luca Boccassi
02eefb41ad
Merge pull request #3039 from msune/refix_pedantic_warnings
...
Problem: C++ style comments in header file breaks pedantic build
2018-04-03 22:31:26 +01:00
Marc Sune
c7d602a29b
Problem: C++ style comments in header file breaks pedantic build
...
Solution: change missing comments in header file
Fixes : #3036 and adds on top of '15905c5'
2018-04-03 22:58:36 +02:00
Simon Giesecke
efc9efc42f
Merge pull request #3037 from bluca/tweetnacl_pedantic
...
Problem: C++ style comments in C file breaks pedantic build
2018-04-03 09:32:46 +02:00
Luca Boccassi
15905c5561
Problem: C++ style comments in C file breaks pedantic build
...
Solution: change comments
Fixes : #3036
2018-04-02 21:52:01 +01:00
Luca Boccassi
2aa54d6620
Merge pull request #3029 from sigiesec/fix-poller-context-shutdown
...
Fix assertion failure when calling zmq_poller_destroy after zmq_ctx_term
2018-03-28 11:27:57 +01:00
Simon Giesecke
f571c22851
Problem: socket_poller destruction after context shutdown is only tested with a non-thread-safe socket
...
Solution: test with both thread-safe and non-thread-safe sockets
2018-03-28 11:23:08 +02:00
Simon Giesecke
87fbb5c447
Problem: socket poller shutdown asserts when context is terminating
...
Solution: do not call getsockopt to query thread-safety of a socket
2018-03-28 11:23:08 +02:00
Simon Giesecke
32c8abb1d8
Problem: regression when zmq_poller_destroy is called after zmq_ctx_term
...
Solution: Added test case to reproduce, not solving the problem!
2018-03-28 10:53:16 +02:00
Simon Giesecke
ef6162ab77
Merge pull request #3027 from bluca/cmake_format
...
Problem: clang-format Travis job broken
2018-03-28 09:41:17 +02:00