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

5147 Commits

Author SHA1 Message Date
Luca Boccassi
861fcaf745 Merge pull request #2113 from hnwyllmm/pollset
remove pollset.hpp/.cpp to src directory
2016-09-20 13:16:57 +01:00
hnwyllmm@126.com
c964b7cfaf remove pollset.hpp/.cpp to src directory 2016-09-20 17:05:14 +08:00
Doron Somech
4039858754 Merge pull request #2112 from hnwyllmm/pollset
Pollset
2016-09-20 09:40:35 +02:00
Laughing
3a5971171f add pollset poller in AIX
add a new poller named pollset which will get benefit of performance in AIX platform.
2016-09-20 10:52:12 +08:00
Laughing
45286fa1fe add pollset poller in AIX
add a new poller named pollset which will get benefit of performance in AIX platform.
2016-09-20 10:50:50 +08:00
Laughing
38931b2d8b add pollset poller in AIX
add a new poller named pollset which will get benefit of performance in AIX platform.
2016-09-20 10:44:37 +08:00
Laughing
390e8f4d82 add pollset poller in AIX
add a new poller named pollset which will get benefit of performance in AIX platform.
2016-09-20 10:44:03 +08:00
Constantin Rack
50e277bd8f Merge pull request #2111 from bluca/ipv6_multi_endpoint
Problem: zmq_connect with IPv6 "source:port;dest:port" format is broken
2016-09-17 21:34:46 +02:00
Luca Boccassi
53e5a9a6f9 Problem: zmq_connect with IPv6 "source:port;dest:port" format is broken
Solution: allow for '[' character when doing the basic sanity check
on the TCP endpoint.
Also add unit tests for both IPv4 and IPv6 source;dest format.
2016-09-17 20:04:40 +01:00
Luca Boccassi
c1d07c6cd6 Problem: test_reqrep_tcp does not have IPv6 tests
Solution: add them
2016-09-17 20:04:40 +01:00
Luca Boccassi
896192ff42 Problem: test_reqrep_tcp does not test multiple endpoints
Solution: add a test for this use case
2016-09-17 19:30:59 +01:00
Luca Boccassi
75219e33a7 Problem: test_reqrep_tcp does not test disconnect/unbind
Solution: add disconnect and unbind calls to the test
2016-09-17 19:30:35 +01:00
Luca Boccassi
8d723fee3d Problem: test_reqrep_tcp is too limited
Solution: refactor it to allow for multiple functionalities to be
tested
2016-09-17 19:30:22 +01:00
Luca Boccassi
f0945c85ef Merge pull request #2110 from c-rack/remove-tabs
Problem: source conatins tabs and trailing spaces
2016-09-17 08:44:35 +01:00
Constantin Rack
8cd33339a1 Problem: source conatins trailing spaces
Solution: remove them
2016-09-17 08:46:54 +02:00
Constantin Rack
022cf2aeaa Problem: source code contains tabs
Solution: replace tabes with spaces
2016-09-17 08:44:00 +02:00
Luca Boccassi
e8d665c4e5 Merge pull request #2106 from kou/support-mingw-cross-compile
Problem: MinGW cross compile is failed on Linux
2016-09-14 16:15:12 +01:00
Kouhei Sutou
da9b9540f3 Problem: MinGW cross compile is failed on Linux
Solution: Use only lower case for header file name.

We can find "wincrypt.h" by "WinCrypt.h" on Windows because Windows uses
case insensitive file system. But we can't find "wincrypt.h" by
"WinCrypt.h" on Linux Because Linux uses case sensitive file system.
2016-09-15 00:07:37 +09:00
Constantin Rack
3683a96fcb Merge pull request #2105 from t-b/bugfix/missing_newline
Problem: Missing newline in printf statement
2016-09-12 19:52:11 +02:00
Thomas Braun
c9c49f3e9f Problem: Missing newline in printf statement
Solution: Add "\n" at end of format string.
2016-09-12 19:45:31 +02:00
Constantin Rack
cf34aeb298 Merge pull request #2100 from a4z/master
Problem: scoped optional mutex lock caused unit tests to fail
2016-09-04 16:45:09 +02:00
a4z
a43f6ce0a6 Problem: scoped optional mutex lock caused unit tests to fail
Solution: Add a scope that scopegurad unlocks the mutex
 before the object instance deletes itself and wants to unlock
a locked mutex
2016-09-04 16:18:07 +02:00
Luca Boccassi
3068f4762a Merge pull request #2099 from a4z/master
Problem: socket_base uses macros for mutex lock and unlock
2016-09-04 11:58:43 +01:00
a4z
9201009f17 Problem: socket_base uses macros for mutex lock and unlock
Solution: add a lock guard that takes optional a mutex and use it
2016-09-04 10:11:47 +02:00
Constantin Rack
fb34c3234d Merge pull request #2097 from bluca/cmake_dist
Problem: CMake build from dist tarball broken
2016-09-01 19:58:57 +02:00
Luca Boccassi
a4ae43e036 Problem: CMake build from dist tarball broken
Solution: include src/version.rc.in and tests/CMakeLists.txt in the
make dist tarball by adding them to makefile.am EXTRA_DIST list.
2016-09-01 13:15:02 +01:00
Constantin Rack
ae31587e4d Merge pull request #2094 from bluca/obs_draft
Problem: cannot build packages with DRAFT APIs
2016-08-28 18:28:58 +02:00
Luca Boccassi
abd37423d3 Problem: cannot build rpm with drafts on OBS
Solution: if rpmbuild is called with --with drafts, which can be
triggered on OBS by adding:
  Macros:
  %_with_drafts 1
to the bottom of the prjconf, then enable draft APIs.
2016-08-28 15:44:55 +01:00
Luca Boccassi
a8a774e71b Problem: cannot build deb with drafts on OBS
Solution: parse the OBS prjconf and the user env variable
DEB_BUILD_OPTIONS. If either of those define "drafts" then build with
draft APIs enabled.
2016-08-28 15:44:55 +01:00
Luca Boccassi
493f17cc81 Merge pull request #2093 from t-b/fix_building_documentation
Fix building documentation
2016-08-28 12:33:15 +01:00
Thomas Braun
ae08099eb5 Problem: Documentation still has .txt suffix
Solution: The regular expression replacement expected a non-existing
space at the beginning of the input files.
2016-08-28 13:06:36 +02:00
Thomas Braun
1303eea508 Problem: Broken documentation build
Solution: The CMAKE module PythonInterp sets the variable
PYTHONINTERP_FOUND and not PYTHON_FOUND if it finds
a python interpreter.
2016-08-28 13:04:02 +02:00
Constantin Rack
81fd4044f0 Merge pull request #2092 from bluca/xp_testutils_ipv6
Problem: testutil.hpp fails to build on Windows XP
2016-08-27 18:15:11 +02:00
Luca Boccassi
a9343dbbc3 Problem: testutil.hpp fails to build on Windows XP
Solution: ifdef is_ipv6_available to always return false if building
on Windows XP, as it doesn't support the needed standard libc
functions
2016-08-27 16:48:38 +01:00
Luca Boccassi
5d1c75f033 Merge pull request #2090 from jolting/patch-1
[gssapi] memory allocation mismatch on windows
2016-08-27 11:28:03 +01:00
Hunter Laux
fd758d7239 [gssapi] memory allocation mismatch on windows
The gssapi has some helper functions gssalloc_malloc()/gssalloc_free()
which on windows doesn't call malloc()/free(). Instead these are
wrappers around HeapAlloc() and HeapFree(). To complicate matters
gssapi doesn't export these helper functions, so you're left using
the allocation method of your choice.

See Here:
89683d1f13/src/lib/gssapi/generic/gssapi_alloc.h

The zmq gssapi implementation is calling malloc and then calling
gss_release_buffer() to free the memory. gss_release_buffer uses
gssalloc_free() to free this buffer which on windows calls HeapFree()
instead of free(). This causes an access violation on windows.
2016-08-26 18:23:31 -07:00
Constantin Rack
7f8a1da372 Merge pull request #2089 from bluca/ipv6_test_windows
Problem: tests should not create 2 ZMQ contexts
2016-08-24 08:04:36 +02:00
Luca Boccassi
0002824fc0 Problem: is_ipv6_available needs context to work on Windows
Solution: call the function after the zmq_ctx has been created, not
before, so that the relevant Windows system calls have been setup.
2016-08-23 21:48:57 +01:00
Luca Boccassi
f486176741 Revert "is_ipv6_available: Create a fake zmq context on windows"
This reverts commit 9adf20aaeb2abfcbdf6baa08e524207c5b8c4dfb.
2016-08-23 21:46:43 +01:00
Luca Boccassi
aab6ca787d Merge pull request #2088 from t-b/bugfix/initialize_network_stack_for_ipv6_test
is_ipv6_available: Create a fake zmq context on windows
2016-08-23 21:45:52 +01:00
Thomas Braun
9adf20aaeb is_ipv6_available: Create a fake zmq context on windows
This is required as zmq_ctx_new calls WSAStartup. Without that the IPV6
socket creation always fails.
2016-08-23 21:52:16 +02:00
Luca Boccassi
c9bc939705 Merge pull request #2084 from GreatFruitOmsk/cmake-fix
Fix compatibility with newer CMake.
2016-08-16 08:37:07 +01:00
Ilya Kulakov
8678fcce7c Fix compatibility with newer CMake. 2016-08-15 18:31:12 -07:00
Luca Boccassi
8d00cdd928 Merge pull request #2082 from pijyoi/fix_zmqstream_doc
Problem: zmq_stream doc is confusing regarding ZMQ_SNDMORE flag
2016-08-13 15:04:24 +02:00
KIU Shueng Chuan
5340215613 Problem: zmq_stream doc is confusing regarding ZMQ_SNDMORE flag
Solution: fix it.

The documentation first states that the ZMQ_SNDMORE flag is ignored on
data frames. Then it states that omitting the ZMQ_SNDMORE flag has
consequences. The example HTTP server code further muddies the situation
with a similar comment.

The implementation of ZMQ_STREAM only accepts two-part messages.
The first part is an identity frame while the second and last part is
the data frame.

As with any multipart message, all parts except the last need the
ZMQ_SNDMORE flag. The second and last part would normally omit the
ZMQ_SNDMORE flag to mark the end of the multipart message.

However, the ZMQ_STREAM implementation ignores the ZMQ_SNDMORE flag on
the data frame rather than requiring that it be omitted. The latter
behaviour would have been more consistent with the other ZeroMQ
sockets.
2016-08-13 20:37:24 +08:00
Kevin Sapper
2fc86bc3c6 Merge pull request #2074 from bluca/obs_compress
Problem: OBS compress not available on CentOS
2016-08-01 14:04:05 +00:00
Luca Boccassi
ae0ba5296f Problem: OBS service changes ver after compress
Solution: run the update version service before the recompress
service
2016-08-01 15:01:47 +01:00
Luca Boccassi
9029121eb4 Problem: OBS compress not available on CentOS
Solution: run the obs-service-compress at service time rather than
buildtime
2016-08-01 12:35:24 +01:00
Constantin Rack
845426710e Merge pull request #2073 from bluca/obs
Problem: no OBS _service and various packaging problems
2016-07-31 18:39:15 +02:00
Luca Boccassi
6822252f49 Problem: no OBS service file
Solution: add one similar to the one generated by zproject
2016-07-31 17:10:34 +01:00
Luca Boccassi
ce75606430 Problem: RPM package does not follow convention
Solution: name the binary package that ships the library libzmq5 to
adhere to the soname convention for RPMs
2016-07-31 17:10:34 +01:00
Luca Boccassi
202e7e03e3 Problem: RPM build targets outdated docs
Solution: update manpages list and use wildcard where possible in the
spec file
2016-07-31 17:10:34 +01:00
Luca Boccassi
faaa8e53fe Problem: RPM has hard-coded SONAME versions
Solution: target wildcard in the spec file to make maintenance
easier
2016-07-31 17:10:34 +01:00
Luca Boccassi
c4defc75c0 Problem: RPM does not support PGM
Solution: build-depend on the libraries and add parameters in the
spec file
2016-07-31 17:10:34 +01:00
Luca Boccassi
373b63de9e Problem: RPM build does not support automake
Solution: build-depend on the toolchain and call autoreconf in the
spec
2016-07-31 17:10:33 +01:00
Luca Boccassi
0372e5ce22 Problem: spec file needs version before build on OBS
Solution: stop autogenerating it and hard code version so that the
OBS build service can extract it and use it to build packages
automatically
2016-07-31 17:10:33 +01:00
Luca Boccassi
9c741c09a1 Problem: no Debian packaging
Solution: import and adapt Debian's packaging code from
https://packages.debian.org/source/unstable/zeromq3
As noted in packaging/debian/copyright, these files are licensed
under the LGPL2+ and the copyright belongs to the authors listed in
the same file.
2016-07-31 17:10:33 +01:00
Luca Boccassi
a7ccb35c1f Merge pull request #2072 from reza-ebrahimi/master
Fixing indentations related to commit #2071
2016-07-31 17:08:54 +01:00
reza-ebrahimi
a2db60e1b8 Fixing indentation related to commit #2071 2016-07-31 20:19:03 +03:30
Reza Ebrahimi
e5599de6c3 Convert manual (locking and unlocking) mutexes to scoped mutexes for the case of unlocking mutex even if the protected operation throws an exception (#2071) 2016-07-31 13:27:11 +01:00
hjp
bbece557c9 Fix copy/paste error (#2070) 2016-07-31 00:50:07 +01:00
Constantin Rack
61f9e71ee2 Merge pull request #2069 from hjp/master 2016-07-30 22:06:27 +02:00
Peter J. Holzer
e175fe21e5 Avoid race condition with accept4 where available
Linux provides accept4(2) which will return a socket with FD_CLOEXEC set
when called with the SOCK_CLOEXEC flag. So call this when available and
fall back to fcntl(..., FD_CLOEXEC) if not.
2016-07-30 21:45:30 +02:00
camachat
5e684172d6 Fix build with NORM enabled on FreeBSD. (#2066) 2016-07-27 19:42:35 +01:00
Constantin Rack
3814b87330 Merge pull request #2065 from bluca/osx_sed
Problem: Travis CI OSX builds are broken
2016-07-24 16:06:33 +02:00
Luca Boccassi
531b3bf7c3 Problem: Travis CI OSX builds are broken
Solution: add a workaround to reinstall libtool. Travis hasn't fixed
the issue in a month, so time for a little hack until they sort it.
2016-07-24 14:24:24 +01:00
Luca Boccassi
b2e8a90a97 Merge pull request #2064 from garlick/issue_2051
Problem: getifaddrs can fail with ECONNREFUSED
2016-07-20 23:18:00 +01:00
Jim Garlick
d090a871bc Problem: getifaddrs can fail with ECONNREFUSED
getifaddrs() can fail transiently with ECONNREFUSED on Linux.
This has been observed with Linux 3.10 when multiple processes
call zmq::tcp_address_t::resolve_nic_name() simultaneously.

Before asserting in this case, make 10 attempts, with exponential
backoff, given by (1 msec * 2^i), where i is the attempt number.

Fixes #2051
2016-07-20 09:33:33 -07:00
Doron Somech
d44ef4fa5f Merge pull request #2061 from cowo78/master
Minor fixes/changes in Win32/MSVC build system
2016-07-12 17:46:49 +03:00
Giuseppe Corbelli
7fdb167732 [tests/testutil.hpp] Problem: wrong windows.hpp path
Solution: correct path is ../src/windows.hpp. Also added automatic linking
of iphlpapi library if required and using MSVC
2016-07-12 15:58:17 +02:00
Giuseppe Corbelli
0b01cc1ebc [tests/CMakeLists.txt] Problem: The libzmq.lib search path should be set
only if the library is found at a specific path

Solution: Search for libzmq.lib in ../bin/Win32/Debug/v120/dynamic, don't
know how to automatically search in correct path based on current build
configuration
2016-07-12 15:54:55 +02:00
Luca Boccassi
f9c86872e5 Merge pull request #2054 from BLangpap/master
Problem: parameter %1 set hard to build target and prevents the skipp…
2016-07-04 11:21:42 +01:00
Bernd Langpap
96c306cc54 Problem: parameter %1 set hard to build target and prevents the skipping of pause
Solution: removed Pause
2016-07-04 12:13:44 +02:00
Luca Boccassi
d51940a9f5 Merge pull request #2053 from BLangpap/master
modified build.bat for msvc to support non-pausing script-based instal…
2016-07-04 10:30:34 +01:00
Bernd Langpap
73631bf1c9 modified build.bat to support non-pausing installation 2016-07-04 11:06:56 +02:00
Bernd Langpap
5de974a036 modified build.bat for msvc to support no-pausing script-based installation
Signed-off-by: Bernd Langpap <Bernd.Langpap@airbus.com>
2016-07-04 10:31:11 +02:00
Luca Boccassi
9561cc8c24 Merge pull request #2046 from pijyoi/reduce_msvc_warnings
Problem: MSVC warns about event monitoring functions converting SOCKET to int
2016-06-20 16:10:07 +01:00
KIU Shueng Chuan
603cd1db88 change event monitoring functions to use zmq::fd_t 2016-06-20 22:27:52 +08:00
Doron Somech
5eb6fc3b08 Merge pull request #2045 from sheremetyev/update-ignores
Add missing Git ignores.
2016-06-20 16:08:55 +03:00
Fedor Sheremetyev
219f2ffa46 Add missing Git ignores. 2016-06-20 13:58:23 +01:00
Doron Somech
a1f691e799 Merge pull request #2042 from sheremetyev/xpub-unsubscribe-manual
Send manual unsubscriptions on pipe termination in XPUB
2016-06-17 16:01:42 +03:00
Fedor Sheremetyev
baea406683 Store manual subscriptions in XPUB and send them out on pipe termination. 2016-06-17 11:40:17 +01:00
Fedor Sheremetyev
813c738137 Add test for consistent unsubscription in XPUB manual mode.
Expect custom messages on both explicit unsubscription and pipe termination.
2016-06-17 11:36:13 +01:00
Luca Boccassi
a343059aad Merge pull request #2041 from packetstash/select-fix-rebased
Copy instead of reference to a vector that gets reallocated.
2016-06-16 22:48:36 +01:00
Douglas Cuthbertson
4019112a82 Copy instead of reference to a vector that gets reallocated. 2016-06-16 17:34:22 -04:00
Luca Boccassi
b3bfa420ea Merge pull request #2036 from aburgm/abort-flush
Flush stderr buffer before calling zmq_abort in assert macros
2016-06-13 20:17:55 +02:00
Armin Burgmeier
07a374357e Flush stderr buffer before calling zmq_abort in assert macros
On Windows, the written message does not seem to be guaranteed to be
written to stderr, in particular when stderr is redirected to a file. I
suppose this is because RaiseException terminates the process in a way
that does not give the CRT a chance to flush stdio buffers (or if it
does, there might be a problem when more than one CRT instance is linked
into the program and they overwrite each other's exception handler). Either
way, just make sure the assertion message ends up written to stderr to
ease diagnostics.
2016-06-13 09:26:45 -07:00
Luca Boccassi
95782450c7 Merge pull request #2035 from slishak/master
Problem: FD_SETSIZE not set to 16k for all build definitions
2016-06-13 11:55:31 +02:00
Sam Lishak
d49e43bbc8 Problem: FD_SETSIZE not set to 16k for all build definitions
Solution: Set FD_SETSIZE to 16k for all other build definitions.
2016-06-13 09:42:54 +01:00
Luca Boccassi
cb0eaf6bce Merge pull request #2034 from michicc/poll_windows
Poll() implementation for Windows Vista+
2016-06-11 19:31:37 +02:00
Michael Lutz
7a6ff07a01 Problem: Windows performance is not optimal due to select().
Solution: Provide poll() for Windows as well. This is a build option that
defaults to off as the resulting binary will only run on Windows Vista or
newer.

This is not tested with alternative Winsock service providers like VMCI,
but the documentation for WSAPoll does not mention limitations.

On my local machine, throughput improves by ~10 % (20 simultaneous
remote_thr workes to one local_thr, 10 byte messages), while latency
improves by ~30 % (measured with remote/local_lat).
2016-06-11 19:17:18 +02:00
Michael Lutz
8d8d32f4d0 Problem: Theoretical overflow when polling more than INT_MAX handles.
Solution: Always use fd_t when accessing the pollset.
2016-06-11 18:50:40 +02:00
Constantin Rack
7292de8de5 Merge pull request #2031 from bluca/vector_data
Problem: std:vector.data breaks compat with C++98
2016-06-11 14:43:10 +02:00
Luca Boccassi
0dede9b50b Problem: std:vector.data breaks compat with C++98
Solution: use buffer address instead
2016-06-09 23:54:29 +01:00
Luca Boccassi
4ea6df43bd Merge pull request #2032 from jlblancoc/patch-1
Fix build error in MSVC11
2016-06-10 00:51:49 +02:00
Jose Luis Blanco-Claraco
38d7bec19e Fix build error in MSVC11
(and probably other MSVC versions)
2016-06-10 00:42:43 +02:00
Joe Eli McIlvain
dc40c95c47 Merge pull request #2028 from bluca/update_ndk
Problem: Android CI NDK version and C++ ABI are outdated
2016-06-07 16:47:55 -07:00
Luca Boccassi
b4abaad269 Problem: Android CI uses outdated C++ ABI 4.8
Solution: switch to 4.9
2016-06-07 23:56:34 +01:00
Luca Boccassi
b872e7d9f7 Problem: Android CI NDK version out of date
Solution: update CI scripts to use newer r11c from r10e
2016-06-07 23:56:28 +01:00
Luca Boccassi
8be568916e Problem: Android CI script hardcodes ABI version
Solution: use a variable for easier maintenance, in sync with zproject
2016-06-07 23:18:21 +01:00