0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-01 02:27:49 +08:00

4965 Commits

Author SHA1 Message Date
Luca Boccassi
95acb29bfb Merge pull request #1934 from somdoron/master
problem: no documentation for Radio-dish and UDP
2016-04-29 10:40:56 +01:00
somdoron
fee84134e7 UDP and Radio-dish documentation 2016-04-29 12:17:17 +03:00
somdoron
34d5028ea8 allow specify binding address on radio with udp 2016-04-29 12:17:17 +03:00
Doron Somech
9ec9c4ad0c Merge pull request #1933 from sappo/master
Problem: relicense statement from imatix is in the wrong place
2016-04-29 11:50:59 +03:00
Kevin Sapper
a1ee5e3136 Problem: relicense statement from imatix is in the wrong place
Solution: move the statement to the folder introduced in commit:
dd51cad082923a5973cdaff9c0418e5ab28de763
2016-04-29 09:47:39 +02:00
Kevin Sapper
5264a9afce Merge pull request #1917 from hintjens/master
Problem: need to collect grants to relicense under MPLv2
2016-04-29 09:39:23 +02:00
Kevin Sapper
c1155fad71 Merge pull request #1925 from ewen-naos-nz/ewen_mcneill_relicense_naos
Naos Ltd license grant/quitclaim
2016-04-29 09:38:56 +02:00
Kevin Sapper
f64c8429b9 Merge pull request #1924 from ewen-naos-nz/ewen_mcneill_relicense_readme
RELICENSE: Start collecting MPLv2 license grants
2016-04-29 09:38:18 +02:00
Doron Somech
f7cf246373 Merge pull request #1932 from hitstergtd/doxygen-libzmq
Problem: libzmq lacks a good doxygen config
2016-04-29 09:36:20 +03:00
hitstergtd
f950f2ba69 Problem: No default doxygen cfg for ZeroMQ project
Solution:
- Add Doxygen.cfg file to make it simpler for library users and interested
parties to view library internals/externals
- Add README.doxygen.md as an Overview for Doxygen-generated documentation

Notes:
This could later be added into CI for autogenerated documentation that could be
posted to the gh-pages branch.
2016-04-28 14:14:38 +01:00
Luca Boccassi
6712f6dd01 Merge pull request #1931 from hitstergtd/unistd-fix
Problem: unistd.h redundantly included twice
2016-04-27 11:15:14 +01:00
Ewen McNeill
e604bbcc13 RELICENSE: Link to 0MQ Licensing page 2016-04-27 20:27:09 +12:00
Doron Somech
3df0a4f7e4 Merge pull request #1929 from hitstergtd/autotools-fix
Problem: test_pub_invert_matching missing in autotools build
2016-04-26 19:01:36 +03:00
hitstergtd
9218441f97 Problem: unistd.h redundantly included twice
Solution: fix it
2016-04-26 16:57:30 +01:00
hitstergtd
876ee5d6b4 Problem: test_pub_invert_matching missing in autotools build
Solution:
- add it to Makefile.am
2016-04-26 16:29:06 +01:00
Doron Somech
4b3199fefa Merge pull request #1927 from hitstergtd/codespell-fixes
Problem: tune_tcp_keepalives signature more than 80 chars on a line
2016-04-25 16:02:11 +03:00
Luca Boccassi
af82d0641c Merge pull request #1926 from hitstergtd/codespell-fixes
Problem: typos and trailing whitespace in code/comments
2016-04-25 13:44:47 +01:00
hitstergtd
d3c800a237 Problem: tune_tcp_keepalives signature >80 chars
Solution: fix it
2016-04-25 13:43:10 +01:00
hitstergtd
b2d0ab18f2 Problem: trailing whitespace in code
Solution: fix them
2016-04-25 12:18:46 +01:00
hitstergtd
11311f9776 Problem: trailing spaces in code comments
Solution: fix them
2016-04-25 11:18:49 +01:00
hitstergtd
a4b426b18e Problem: typos/trailing spaces in code comments
Solution: fix them
2016-04-25 11:16:26 +01:00
Ewen McNeill
0e5ea0c8f0 RELICENSE: Naos Ltd MPLv2 grant 2016-04-25 11:28:04 +12:00
Ewen McNeill
dd51cad082 RELICENSE: Start collecting MPLv2 license grants 2016-04-25 11:24:50 +12:00
Luca Boccassi
7b9005a7a1 Merge pull request #1923 from hitstergtd/testxpubmanual-msvc-fix
Problem: XPUB test broken since #1566 on Windows
2016-04-24 17:04:40 +01:00
hitstergtd
8872809337 Problem: XPUB test broken since #1566 on Windows
Solution:
- Adjust test_xpub_proxy_unsubscribe_disconnect() to support different
  protocol types
- Exclude the IPC tests on Windows and OpenVMS

H/T: @somdoron
2016-04-24 16:56:06 +01:00
Constantin Rack
fb015569a2 Merge pull request #1921 from somdoron/master
problem: no way to detect in czmq if timers class available
2016-04-24 11:32:53 +02:00
somdoron
9798f74d17 add have timers define to detect if timers class available 2016-04-24 12:30:35 +03:00
Pieter Hintjens
a4d219c07a Problem: need to collect grants to relicense under MPLv2
Solution: kick off process with grant from iMatix
2016-04-24 08:23:24 +02:00
Luca Boccassi
230df282bd Merge pull request #1920 from somdoron/master
problem: Tests are failing on windows
2016-04-23 20:42:27 +01:00
Doron Somech
0655ed2e0e fix test unbind wildcard 2016-04-23 22:30:10 +03:00
Doron Somech
0934bc784d fix test term endpoint 2016-04-23 22:30:09 +03:00
Hitster GTD
6f1dc64ff3 Merge pull request #1919 from bluca/xpub_test_logic
Problem: assertion in test_xpub_manual is swapped
2016-04-23 18:29:48 +01:00
Luca Boccassi
a93600309f Problem: assertion in test_xpub_manual is swapped
Solution: check that both pointers passed as arguments to
test_missing_subscription are non-NULL, instead of the opposite.
2016-04-23 18:16:49 +01:00
Doron Somech
dd038ae38e Merge pull request #1918 from hitstergtd/hitstergtd-testxpubmanual-win
Problem: XPUB test broken on Windows since #1569
2016-04-23 18:46:15 +03:00
hitstergtd
ff02862171 Problem: XPUB test broken on Windows since #1569
Solution:
- Adjust test_subscriptions() to support different protocol types
- Run TCP and IPC tests everywhere but on Windows and OpenVMS
2016-04-23 16:18:38 +01:00
Luca Boccassi
4ae62dfc29 Merge pull request #1916 from linville/master
Fix unresolved external symbols for gather and scatter classes on MSVC 2010-2015.
2016-04-23 00:43:41 +01:00
Aaron Linville
a57fd70844 Fix issue with unresolved external symbols for the gather and scatter classes by adding them to the MSVC 2010, 2012, 2013 and 2015 projects. 2016-04-22 19:26:55 -04:00
Constantin Rack
ad4e091a5a Merge pull request #1915 from hitstergtd/checkproto-windows-fix
Problem: Windows IPC check broken (check_protocol)
2016-04-22 21:24:07 +02:00
hitstergtd
7feb1e49fc Problem: Windows IPC check broken (check_protocol)
Solution: Fix the preprocessor check from || to &&
2016-04-22 19:55:08 +01:00
Doron Somech
0ece425dca Merge pull request #1914 from hitstergtd/clang-testfiles-fix
Problem: LD search path warnings if using Clang
2016-04-22 15:37:48 +03:00
hitstergtd
7f0e380c05 Problem: LD search path warnings if using Clang
Solution: PR #1906 did not solve this problem properly; subsequent Travis CI
indicated that the issue happens with Clang/LLVM, so make sure to fix the
issue by detecting if Cmake CMake is using Clang for building the tests.
2016-04-21 22:32:15 +01:00
Hitster GTD
23e42526eb Merge pull request #1913 from bluca/ipc_windows
Problem: test_ipc_wildcard is ran on Windows
2016-04-21 14:39:13 +01:00
Luca Boccassi
5178251587 Problem: test_ipc_wildcard is ran on Windows
Solution: move it to the unix-only section of Makefile.am and
tests/CMakeLists.txt since it uses Unix IPC sockets.
2016-04-21 14:17:10 +01:00
Doron Somech
d6a57ad589 Merge pull request #1912 from hitstergtd/hitstergtd-testsrcfd-win-fix
Problem: ZMQ_SRCFD test does not work on Windows
2016-04-21 15:38:05 +03:00
hitstergtd
e8aeb3686d Problem: ZMQ_SRCFD test does not work on Windows
Solution: add Winsock specific assertions, since getpeername() should will
return SOCKET_ERROR (-1) and WSAGetLastError() will be set to WSAENOTSOCK
2016-04-21 13:24:02 +01:00
Hitster GTD
99763cce41 Merge pull request #1909 from somdoron/master
problem: push-pull socket types are not thread safe
2016-04-21 12:54:04 +01:00
somdoron
e6dae56c6e Scatter-Gather socket types 2016-04-21 14:50:58 +03:00
Constantin Rack
fae3a4e02a Merge pull request #1911 from somdoron/FixUDPWindows 2016-04-21 13:18:57 +02:00
Doron Somech
bf50f9fe75 Merge pull request #1910 from bluca/tipc
Problem: CMake CI does not run make test, and there is no checking for TIPC
2016-04-21 14:05:46 +03:00
Doron Somech
87e455f59b Fix UDP failing on windows 2016-04-21 14:00:02 +03:00
Luca Boccassi
a117c1f48d Problem: Travis CI CMake build does not run tests
Solution: add make test to the cmake/ci_build.sh script
2016-04-21 11:35:43 +01:00
Luca Boccassi
ea294afd8b Problem: CMake does not check for TIPC support
Solution: add macro in ZMQSourceRunChecks.cmake and optionally
include the TIPC sources if the support is available.
More importantly, only run the TIPC tests if the support is there.
2016-04-21 11:33:20 +01:00
Luca Boccassi
317499edae Merge pull request #1906 from hitstergtd/hitstergtd-cmake-tests-os-fix
Problem: Linker search path warnings on OS X
2016-04-19 13:00:32 +01:00
hitstergtd
846b2ba174 Problem: Linker search path warnings on OS X
Problem:
A per-test Linker search path was added in commit a911fa4 to CMakeLists.txt as
part of fixing Windows builds. Whilst this is silently ignored by ld(1) on
Linux, it doesn't settle well with OS X. Spurious warnings are generated about
missing directories leading to convoluted build logs.

Solution:
Make per-Test LINK_DIRECTORIES() conditional for non-Apple platforms.
2016-04-19 12:38:16 +01:00
Constantin Rack
136870f298 Merge pull request #1902 from bluca/zmq_unbind_api_breakage 2016-04-18 20:21:02 +02:00
Luca Boccassi
c8211bf320 Problem: can't unbind with bound addr with IPv6
Solution: try to resolve the TCP endpoint passed by the user in the
zmq_unbind call before giving up, if it doesn't match.
This fixes a breakage in the API, where after a call to
zmq_bind(s, "tcp://127.0.0.1:9999") with IPv6 enabled on s would
result in the call to zmq_unbind(s, "tcp://127.0.0.1:9999") failing.
Add more test cases to increase coverage on all combinations of TCP
endpoints.
2016-04-18 18:43:36 +01:00
Luca Boccassi
58c4e7e6b6 Problem: IPv6 is disabled on Travis Precise/Trusty
Solution: add one test run in a docket container environment, which
is currently the only environment where it's possibile to bind a
socket to ::1.
2016-04-18 18:43:36 +01:00
Luca Boccassi
ac0e97e5dc Problem: can't test if IPv6 is available in tests
Solution: add helper function is_ipv6_available to testutil.hpp to
test if IPv6 is available on the building platform.
This function will try to open and bind a socket to ::1:*, as it's
the ultimate way of knowing if, at least on the loopback, IPv6 is
enabled.
2016-04-18 18:43:36 +01:00
Luca Boccassi
8d49650ac8 Merge pull request #1901 from hitstergtd/hitstergtd-testcmake-fix
Problem: comment not well formed in CMakeLists.txt
2016-04-18 16:44:03 +01:00
hitstergtd
e09eb0db6f Problem: comment not well formed in CMakeLists.txt
Solution: fix comment
2016-04-18 16:33:34 +01:00
Luca Boccassi
1d083a33fd Merge pull request #1900 from hitstergtd/hitstergtd-testudp-fix
Problem: test_udp does not release resources properly
2016-04-18 15:21:35 +01:00
hitstergtd
9a9bfb6443 Problem: test_udp does not release resources properly
Solution:
- call zmq_msg_close() if there is an error
- call free() to release resources if there is an error (CWE-404)
2016-04-18 14:44:54 +01:00
Constantin Rack
c354e0b371 Merge pull request #1898 from hitstergtd/checkprotocol-fixes-1
Problem: check_protocol() logic duplicated twice and needs cleanup
2016-04-15 19:48:59 +02:00
hitstergtd
8cb27316fa Problem: check_protocol() logic duplicated twice
Problem:
Conditional logic in check_protocol() that checks if a protocol is supported,
is duplicated twice. Moreover, the first set of checks to ascertain if a
protocol is supported is done regardless of whether the particular protocol
will be built into the library or not.

Solution:
* Simplify/collapse all supported protocol checks into one in check_protocol()
* Enclose pgm/epgm/norm socket+protocol match checks with requisite macros
2016-04-15 15:39:46 +01:00
Joe Eli McIlvain
a670e81e73 Merge pull request #1897 from hitstergtd/udp-errno-fix
Problem: errno not set if UDP is NOT used with ZMQ_RADIO or ZMQ_DISH
2016-04-14 17:29:18 -07:00
hitstergtd
362377948e Problem: errno not set if UDP is NOT used with ZMQ_RADIO or ZMQ_DISH
Solution: set errno to ENOCOMPATPROTO in check_protocol()
2016-04-15 01:23:34 +01:00
Luca Boccassi
c2a1be5c15 Merge pull request #1896 from hitstergtd/macosx-testfixes-1
Problem: Running Linux-only tests results in 10% of tests failing on non-Linux systems (OSX, et. al.)
2016-04-15 00:33:31 +01:00
hitstergtd
307bd952bc Make all Linux-specific tests conditional
Move tests specific to Linux under a platform conditional thereby eliminating
unnecessary builds and fixing "make test" on Mac OS X and possibly other
non-Linux systems.

Tests specific to Linux:
    - abstract namespace support for AF_UNIX sockets
    - TIPC support (AF_TIPC)

Test success rate jumps from 90% to 100% on Mac OS X after this change.
2016-04-14 23:44:17 +01:00
Constantin Rack
8c88297e63 Merge pull request #1895 from hitstergtd/libzmq-docfixes-2
Fix typos similar to #1894
2016-04-14 22:16:27 +02:00
hitstergtd
a17389eeb0 Fix typos similar to #1894 2016-04-14 21:10:12 +01:00
Constantin Rack
6a7eb2fbc1 Merge pull request #1894 from hitstergtd/libzmq-docfixes-1
Fix typo
2016-04-14 22:05:24 +02:00
hitstergtd
6c3129286d Fix typo 2016-04-14 21:02:53 +01:00
Constantin Rack
3f77cf5a2f Merge pull request #1892 from bluca/solaris_fixes 2016-04-13 05:18:12 +02:00
Constantin Rack
f6f89a84d9 Merge pull request #1893 from paddor/master 2016-04-13 05:16:07 +02:00
Patrik Wenger
ba9a559fe5 Problem: PR #1891 wasn't complete
Solution: make the same change for the ZMQ_POLL_BASED_ON_SELECT case
2016-04-13 03:01:14 +02:00
Patrik Wenger
1afed1d32e Problem: tabs instead of spaces used for indentation
Solution: correct it to spaces
2016-04-13 03:01:14 +02:00
Luca Boccassi
b1232a0fd8 Problem: Solaris build fails with libsodium
Solution: disable pedantic and Werror, as libsodium headers use
pragma diagnostic which are not available in gcc 3.4.
2016-04-13 00:32:19 +01:00
Luca Boccassi
a01baba38b Problem: test_use_fd_tcp does not work on Solaris
Solution: pass a struct addrinfo hint to getaddrinfo with a hint
about the address family to avoid a failure.
2016-04-13 00:32:19 +01:00
Luca Boccassi
edda1657fa Problem: pragma diagnostic is new in GCC 4.2
Solution: check for GCC version before using pragma diagnostic
in src/tweetnacl.c to avoid an additional warning.
2016-04-13 00:31:58 +01:00
Luca Boccassi
abe44500de Problem: tweetnacl does not build on Solaris 10
Solution: add Wnosign-compare to CPPFLAGS. GCC version is too old on
Solaris 10 to use pragma diagnostic (min 4.2 needed, but 3.4 is
available)
2016-04-13 00:31:58 +01:00
Constantin Rack
c54589daef Merge pull request #1891 from paddor/master
Fix return value of zmq_poller_wait when used on empty poller
2016-04-12 20:35:31 +02:00
Patrik Wenger
621c965fae Problem: tricky return value from zmq::socket_poller_t::wait when poller is empty
Solution: return -1 (no event) instead of 0 (event)

For some reason, this just returns 0 if there are no sockets registered
on the poller. Usually this would mean there has been an event. So the
caller would have to check the return value AND the event, or write code
that takes the number of registered sockets into consideration.

By returning -1 and setting errno = ETIMEDOUT like in the usual timeout
cases, it's more consistent and convenient.

Test case included.
2016-04-12 20:11:50 +02:00
Patrik Wenger
b5dc794202 Problem: zmq_poller_wait doesn't check *event arg
Solution: use zmq_assert to ensure it's not a nullpointer
2016-04-12 20:10:54 +02:00
Luca Boccassi
d570f57b6e Problem: ipc://* random dir created with USE_FD
Solution: if options.use_fd do not create temporary random
directory for ipc://*, since the socket is already created and
passed to the library by the user.
2016-04-11 00:18:51 +01:00
Luca Boccassi
f18463f323 Problem: mkdtemp not available on all platforms
Solution: check for availability in autoconf and cmake, and if not
available fall back to random file name rather than random directory.
2016-04-11 00:18:51 +01:00
Luca Boccassi
8028817f6b Problem: 1E9 is double but assigned to an int var
Solution: use the less nice but correct int constant 1000000000
instead of the shorter 1E9 to avoid a compiler warning when assigning
to timespec.tv_nsec, which is a long int.
2016-04-11 00:00:32 +01:00
Constantin Rack
32f2b784b9 Merge pull request #1889 from spadalkar/master 2016-04-08 06:09:27 +02:00
Satyajit Padalkar
e3016b66bd Fix tests/test_many_sockets.cpp 2016-04-07 23:41:09 -04:00
Pieter Hintjens
23d08c2024 Merge pull request #1888 from bluca/ipv6_downgrade
Problem: zmq_bind IPv4 fallback still tries IPv6
2016-04-07 17:53:48 +02:00
Luca Boccassi
9cf6f85a25 Problem: redundant Windows errno conversion
Solution: in the Windows-specific ifdef in tcp_listener set_address,
check for error and set errno only after the IPv4 fallback has failed
too, to avoid setting errno when the socket creation succeeds through
the fallback.
2016-04-07 13:29:10 +01:00
Luca Boccassi
99a8795dfe Problem: zmq_connect (TCP) has no IPv4 fallback
Solution: if opening an IPv6 TCP socket fails because IPv6 is not
available, try to open an IPv4 socket instead when creating and
connecting a TCP endpoint.
2016-04-07 13:29:10 +01:00
Luca Boccassi
d169281a00 Problem: zmq_bind IPv4 fallback still tries IPv6
Solution: if opening an IPv6 TCP socket fails because IPv6 is not
available, try to open an IPv4 socket instead when creating and
binding a TCP endpoint.
2016-04-07 13:13:55 +01:00
Luca Boccassi
8251306012 Merge pull request #1885 from jimklimov/zmq_utils_header
Problem: including recent "zmq_utils.h" crashes gcc -pedantic jobs
2016-04-05 16:32:42 +01:00
Jim Klimov
d7d917139b Problem: including recent "zmq_utils.h" crashes gcc -pedantic jobs
Problem: Recent deprecation of the "zmq_utils.h" header file caused pedantic compilations (including czmq) to fail because non-portable #warning is used.
Solution: Limit the deprecation warnings to compilers known or assumed to support the "#pragma message" (GCC, MSVC, CLANG) and wrap with GCC directives to not treat these warnings as errors on paranoid builds.
2016-04-05 17:03:17 +02:00
Constantin Rack
fb4c226365 Merge pull request #1884 from hintjens/master 2016-04-04 13:18:43 +02:00
Pieter Hintjens
9eb74d4df4 Problem: ZMQ_SERVER man page is wrong
It says that ZMQ_SERVER never blocks; whereas it does block on
sending to a client whose pipe is full.

Solution: fix it.
2016-04-04 13:13:27 +02:00
Constantin Rack
aa13a49bc8 Merge pull request #1883 from yuvallanger/master
Fix NetBSD thread scheduling problem.
2016-04-03 10:50:11 +02:00
Yuval Langer
37a4a4075e Fix NetBSD thread scheduling problem.
Defining thread priority for SCHED_OTHER is implementation defined.
Some platforms like NetBSD cannot reassign it as they are dynamic.

<http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_getschedparam.html>

Credit goes to <kamil@netbsd.org> and <riastradh@netbsd.org> for finding this
solution.
2016-04-03 02:34:04 +03:00
Constantin Rack
7a563ebb2c Merge pull request #1882 from FredTreg/master
Fixed ZMQ_REQ_CORRELATE (see pull request #1730)
2016-04-02 21:57:22 +02:00
Frederic Tregon
625b618776 Fixed ZMQ_REQ_CORRELATE (see pull request #1730)
Problem: Since pull request #1730 was merged, protocol for REQ socket is
checked at the session level and this check does not take into account
the possibility of a request_id being part of the message. Thus the option
ZMQ_REQ_CORRELATE would no longer work.
This is now fixed: the possiblity of a 4 bytes integer being present
before the delimiter frame is taken into account (whether or not this
breaks the REQ/REP RFC is another issue).
2016-04-02 18:36:29 +02:00