0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 08:39:42 +08:00

4682 Commits

Author SHA1 Message Date
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
Constantin Rack
0feec7a72e Merge pull request #1881 from camachat/master
Fixes #1419 segfault when using a XSUB/XPUB proxy.
2016-04-02 18:30:09 +02:00
Eric Camachat
023b34a144 Fix issue #1419 segfault when using a XSUB/XPUB proxy.
Ref. https://github.com/zeromq/libzmq/issues/1419
2016-04-02 09:08:40 -07:00
Constantin Rack
a7922e5fdd Merge pull request #1880 from MatthewPowley/fix-windows-xp-compatability
Windows XP compatability fixes
2016-03-31 21:09:28 +02:00
Matt Powley
f2018ab317 Fixes for Windows XP compatibility
A Visual Studio build from master (commit id: dac5b45dfb224ff184a7aed39c5859ae5bac3803) using the v140_xp toolset yields a binary that is not XP compatible.

Two libraries contain exports that cannot be found:
 -  IPHLPAPI.DLL : if_nametoindex
 - KERNEL32.DLL : InitializeConditionVariable

The latter export is already dealt with in the file './src/condition_variable.hpp'; however this requires setting the _WIN32_WINNT pre-processor definition.
I am not experienced enough to figure a work around for the 'if_nametoindex' method, so I have created a new pre-processor definition 'ZMQ_HAVE_WINDOWS_TARGET_XP' and removed the calling of the function with the limitation that these builds cannot handle a IPv6 address with an adapter name.

To make it easier for people targeting XP with an MSVC build I have modified the MSBuild property file to add/modify the pre-processor definitions if they are building using a XP targeting tool set; such as v140_xp.
2016-03-31 15:45:00 +01:00
Constantin Rack
dac5b45dfb Merge pull request #1879 from MatthewPowley/improve-msvc-builds
Improve MSVC builds
2016-03-31 16:11:24 +02:00
Matt Powley
260860dea1 Add .gitignore for Visual Studio builds in the 'builds/msvc' folder
* Added a new .gitignore file for excluding Visual Studio build output any popular plug-in generated content. (This was copied from the GitHub project https://github.com/github/gitignore).
* Removed the basic ignore settings from the root folder in favour of more precision within the subfolder's .gitignore file
* Added the new VC compiler's experimental Intellisense database file
2016-03-31 14:51:36 +01:00
Matt Powley
0e405a5a77 Use vs2015 MSBuild property sheets in older projects
All the older (vs2010 -> vs2013) projects had copies of the Visual Studio 2015 MSBuild applied to them when running the 'configure.bat' batch file. Any modifications to a property sheet was not applied to the other Visual Studio versions' projects unless the batch file was re-executed.

* Modified the older projects to reference the Visual Studio 2015 property sheets so changes are immediately applied
* Removed the batch file copy steps (which left the repository very dirty after execution)
2016-03-31 14:51:23 +01:00
Luca Boccassi
cddfda2aed Merge pull request #1875 from hintjens/master
Tweaks to building libzmq
2016-03-30 13:44:00 +01:00
Pieter Hintjens
e70e39be49 Problem: ctx.cpp still uses old HAVE_LIBSODIUM
I changed this to ZMQ_USE_SODIUM to be consistent with other
configuration options (especially ZMQ_USE_TWEETNACL).

Solution: fix it.
2016-03-30 14:39:34 +02:00
Luca Boccassi
d6354c64ea Merge pull request #1874 from hintjens/master
Tweaks to building libzmq
2016-03-30 13:34:40 +01:00
Pieter Hintjens
396237f871 Problem: MSVC builds instructions aren't entirely clear
Solution: update them.
2016-03-30 14:19:20 +02:00
Pieter Hintjens
6a78b3ec19 Problem: HAVE_LIBSODIUM macro is inconsistent
Solution: use ZMQ_USE_LIBSODIUM to match ZMQ_USE_TWEETNACL
2016-03-30 14:19:20 +02:00
Luca Boccassi
6630a7ceaf Merge pull request #1873 from edigaryev/fix-urandom-chroot
Problem: build fails when CURVE security is disabled
2016-03-30 00:36:18 +01:00
Nikolay Edigaryev
8673fa7b03 Problem: build fails when CURVE security is disabled
Solution: use proper preprocessor macro
2016-03-30 04:23:59 +05:00
Joe Eli McIlvain
c71bb5fd1f Merge pull request #1872 from edigaryev/fix-urandom-chroot
Problem: CURVE mechanism is unusable with chroot()
2016-03-29 15:49:19 -07:00
Nikolay Edigaryev
884e00cb4a Problem: CURVE mechanism is unusable with chroot()
libsodium calls abort() when /dev/urandom can't be found
even if one creates ZeroMQ context before calling chroot()[1].

This happens because crypto gets initialized on handshake,
and at that moment the process is already chroot'ed.

Solution: initialize cryptographic libraries in ctx

randombytes_close() is already there in the destructor.

[1] https://download.libsodium.org/doc/usage/index.html
2016-03-30 03:45:12 +05:00
Constantin Rack
c39741dd33 Merge pull request #1871 from gnieboer/gnieboer-patch-1
Update zmq_utils.h
2016-03-29 23:07:38 +02:00
Geof Nieboer
8c7b19b1b7 Update zmq_utils.h
Previous change broke MSVC b/c MSVC doesn't support #warning
2016-03-30 00:00:49 +03:00
Luca Boccassi
05c8de7928 Merge pull request #1869 from jimklimov/fix-tcp_address
zeromq-4.1.4/src/tcp_address.cpp : fix relaxed use of sizeof() without parenthesis
2016-03-29 18:01:10 +01:00
Jim Klimov
e9c8557e92 zeromq-4.1.4/src/tcp_address.cpp : fix relaxed use of sizeof() without parenthesis 2016-03-29 18:43:26 +02:00
Pieter Hintjens
b8ae850d78 Merge pull request #1862 from FredTreg/master
Fixed issue #1695 (ZMQ_REQ_CORRELATE)
2016-03-24 11:45:56 +01:00
Frederic Tregon
e45dfe3bc7 Fixed issue #1695 (ZMQ_REQ_CORRELATE)
Problem: when using ZMQ_REQ_RELAXED + ZMQ_REQ_CORRELATE and two 'send' are
executed in a row and no server is available at the time of the sends,
then the internal request_id used to identify messages gets corrupted and
the two messages end up with the same request_id. The correlation no
longer works in that case and you may end up with the wrong message.

Solution: make a copy of the request_id instance member before sending it
down the pipe.
2016-03-20 20:38:18 +01:00
Pieter Hintjens
98ab7f4164 Merge pull request #1860 from bluca/valgrind
Add Valgrind make target and CI run
2016-03-19 23:03:38 +01:00
Luca Boccassi
dc27ad41d2 Problem: coveralls uses wrong path on Trusty
Solution: pass built-root when calling coveralls, to help it find the
right path to the source code.
2016-03-19 21:55:03 +00:00
Luca Boccassi
0eca822b8f Problem: Valgrind in Ubuntu Precise is too old
Solution: run Travis CI in newer Trusty (14.04 LTS) release.
2016-03-19 21:55:03 +00:00
Luca Boccassi
9d94eb11b3 Problem: test_fork causes valgrind false positive
Solution: do not run test_fork if --enable-valgrind is set. Note that
later versions of Valgrind (3.11) not yet available in all
distributions fix this problem, so we might revert in the future.
2016-03-19 21:54:55 +00:00
Luca Boccassi
00e0957640 Problem: false positive on valgrind 3.10
Solution: update builds/valgrind/valgrind.supp to ignore glibc's
__libc_freeres calls. This code runs after the program exits, and
tries to de-allocate memory allocated internally by glibc, so it has
nothing to do with libzmq code. This suppression is added by default
in newer versions of Valgrind, not yet available on older
distributions.
2016-03-19 21:54:52 +00:00
Luca Boccassi
ebc7316069 Problem: CI doesn't run Valgrind
Solution: run Valgrind only on the default Linux build to avoid
increasing the runtime.
2016-03-19 21:54:52 +00:00
Luca Boccassi
2b2f9046d4 Problem: no Makefile target for Valgrind
Solution: import ax_valgrind_check.m4 macro file to provide a
conveniente automake hook to run Valgrind on all tests.
Add --enable-valgrind to ./configure call and then run make
check-valgrind to run memcheck, helgrind, drd and sgcheck on all
tests. Run check-valgrind-memcheck to run only memcheck.
2016-03-19 21:54:29 +00:00
Luca Boccassi
d5aaaeb888 Merge pull request #1859 from soulik/master
Fix usage of IPv6 addresses
2016-03-19 14:15:34 +00:00
Mário Kašuba
75579fe7d9 Added comment to sockaddr_storage 2016-03-19 14:49:22 +01:00
Mário Kašuba
e38166cc1b Use sockaddr_storage instead of sockaddr to support IPv6 addresses 2016-03-19 14:37:10 +01:00
Constantin Rack
3777309b67 Merge pull request #1858 from zoobab/master 2016-03-18 14:18:59 +01:00