0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-17 04:50:57 +08:00

5143 Commits

Author SHA1 Message Date
Constantin Rack
819bf785b7 Merge pull request #2186 from bluca/de-draft
Problem: socket option marked as draft for 4.2
2016-11-02 07:03:51 +01:00
Luca Boccassi
b5b5f75242 Problem: socket option marked as draft for 4.2
Solution: move comment further below to declare new socket
options as stable for the 4.2.0 release.
2016-11-01 18:49:42 +00:00
Doron Somech
8cf4832e01 Merge pull request #2184 from bluca/rc
Problems: need to bump NEWS and libtool version
v4.2.0-rc1
2016-11-01 16:48:56 +02:00
Luca Boccassi
6da8385b2a Problem: new public symbols added
Solution: bump ABI version fromo 5:0:0 to 6:0:1 since 4.2 is backward
compatible with 4.1, but new symbols are there
2016-11-01 13:18:21 +00:00
Luca Boccassi
e0d6f4ea11 Problem: no NEWS entry for 4.2.0
Solution: add one, empty for now, fill in after RC release
2016-11-01 13:18:02 +00:00
Luca Boccassi
cc70c829cf Merge pull request #2183 from a4z/opmg_cmake
Problem: CMake build rejects to build with openpgm enabled
2016-11-01 11:47:30 +00:00
Harald
6f597d0bd3 Problem: CMake build rejects to build with openpgm enabled
Solution: add optional lookup for openpgm via pkg-config
2016-11-01 12:31:40 +01:00
Constantin Rack
50a6c117f1 Merge pull request #2182 from pmienk/master
Suppress warning on uninitialized variable use by initializing variable.
2016-10-31 20:31:15 +01:00
Phillip Mienk
28fbee74c8 Suppress warning on uninitialized variable use by initializing variable. 2016-10-31 12:25:30 -07:00
Constantin Rack
fb59cd1aad Merge pull request #2181 from jolting/patch-2
Remove an unnecessary while (true)
2016-10-31 19:50:11 +01:00
Hunter Laux
60b63ed518 Remove an unnecessary while (true)
This block of code will either return -1 or fall through.
The while (true) does nothing.
The braces limit the scope of int rc.
2016-10-31 11:46:57 -07:00
Luca Boccassi
2ece58acfd Merge pull request #2180 from cxreg/xpub-metadata-corruption
Increment metadata refcount while it's in pending_metadata
2016-10-29 23:51:28 +01:00
Dave Olszewski
b7f2c7e7ea Increment metadata refcount while it's in pending_metadata 2016-10-29 14:37:28 -07:00
Doron Somech
16f584745d Merge pull request #2179 from bluca/alignment_windoz
Problem: MS VC++ build broken
2016-10-29 12:32:09 +03:00
Luca Boccassi
2484d1c859 Problem: MS VC++ build broken
Solution: try to detect architecture if building with VC++ and
hardcode pointer size accordingly.
Expressions are not allowed inside declspec intrinsics, which
includes other intrinsics.
2016-10-28 17:14:00 +01:00
Doron Somech
ac14981651 Merge pull request #2177 from bluca/alignment
Problem: pointer union for zmq_msg_t is a hack
2016-10-28 18:00:06 +03:00
Luca Boccassi
df367a6682 Problem: pointer union for zmq_msg_t is a hack
Solution: use compiler's alignment attributes instead which is
clearer and less of a hack.
Pointer alignment violations causing crashes on architectures
such as sparc64 and aarch64.
This also avoid triggering ABI checkers as the change is compatible
even though applications that suffer from the bug should rebuild to
take advantage of the fix.
2016-10-28 15:18:48 +01:00
Luca Boccassi
0d032c99a6 Merge pull request #2176 from robertcastle/master
clock_gettime is now defined in macOS 10.12 SDK
2016-10-28 11:29:58 +01:00
Robert Castle
0dfb32a259 Problem: clock_gettime is now defined in macOS 10.12 SDK
Solution: Rename the custom implementation of clock_gettime for macOS to
alt_clock_gettime and wrap all usage in preprocessor macros to only enable the
alternative version when using macOS <= 10.11.

This issue occurs when targeting macOS 10.11 or earlier but using the 10.12
or newer SDK.
2016-10-28 11:04:21 +01:00
Constantin Rack
2e9264354c Merge pull request #2173 from bluca/without_docs
Problem: build API incompatible with 4.1
2016-10-27 18:34:05 +02:00
Luca Boccassi
8345fe9e95 Problem: build API incompatible with 4.1
Solution: keep the new --without-docs option, but also keep the old
--without-documentation with an added deprecation warning.
We can then remove it in the next major release, to leave enough time
for users and maintainers to change it without disruptions.
2016-10-27 14:20:19 +01:00
Doron Somech
1e69309e21 Merge pull request #2171 from bluca/connect_reuse_addr
Problem: 2 connects with same sourceip:port to different destip:port fail
2016-10-24 00:52:03 +03:00
Luca Boccassi
25bf30bebe Problem: 2 connects with same sourceip:port to different destip:port fail
Solution: during a connect with a TCP endpoint if a source address is
passed set the SO_REUSEADDR flag on the socket before the bind system
call.
Add unit test to cover this case for both IPv4 and IPv6.
2016-10-23 22:31:45 +01:00
Luca Boccassi
669ff41d52 Merge pull request #2170 from vielmetti/patch-1
Update INSTALL to note issues with 'make -j check'
2016-10-23 20:15:26 +01:00
Edward Vielmetti
92b1b2b181 Update INSTALL to note issues with 'make -j check'
Some of the tests cannot be run in parallel; until the Makefile is fixed, note this in INSTALL.
2016-10-23 15:12:45 -04:00
Luca Boccassi
1a02b1b3f2 Merge pull request #2168 from outotec/fix-build-2
Problem: Does not build in Visual Studio 2013 / Win32
2016-10-21 22:23:24 +01:00
Juha Reunanen
bb7421dda2 Problem: Does not build in Visual Studio 2013 / Win32
Solution: #include <netioapi.h> and change some IP_ADAPTER_UNICAST_ADDRESS data types
2016-10-21 21:18:45 +03:00
Luca Boccassi
d8f55dde57 Merge pull request #2164 from reunanen/add-EHOSTUNREACH-to-errno_to_string
Add EHOSTUNREACH to errno_to_string
2016-10-18 08:48:35 +01:00
Juha Reunanen
57c765ef5a Add EHOSTUNREACH to errno_to_string 2016-10-18 06:46:50 +03:00
Luca Boccassi
6ce2fb2b06 Merge pull request #2162 from hnwyllmm/master
performance enhancement
2016-10-14 13:55:13 +01:00
Laughing
c5b528fdcd performance enhancement
use clock_gettime if there is no instruction to get cpu tick. It will take about 10% performance enhancement in AIX 7.1.
2016-10-14 20:33:27 +08:00
Jens Auer
b031325996 Fixed problems from previous PR for #2158 (#2160)
* - Fixed windows build errors
- Extended monitor lock scope to prevent race-condition between
  process_stop and monitor

* - Fixed windows build errors
- Extended monitor lock scope to prevent race-condition between
  process_stop and monitor
2016-10-12 10:34:22 +01:00
Luca Boccassi
398f256a5c Merge pull request #2159 from jens-auer/2158
#2158: Add mutex for monitor socket
2016-10-11 16:07:29 +01:00
Jens Auer
d1c7280d05 Add mutex for monitor socket 2016-10-11 13:28:45 +00:00
Constantin Rack
23be1dc0ec Merge pull request #2157 from athampy/master
Fixed issue #2155
2016-10-11 05:56:26 +02:00
Akhil Thampy
134f08b3ca Fixed issue #2155 2016-10-10 17:50:50 -05:00
Mário Kašuba
f6962903a7 Implemented network interface name resolution on Windows platform
Added fallback mechanism for specific socket binding on Windows platform with IPv6 enabled
2016-10-10 17:29:53 +02:00
Mário Kašuba
3996d4e20d Merge branch 'master' of github.com:zeromq/libzmq
# Conflicts:
#	builds/msvc/vs2012/libsodium.import.props
2016-10-10 11:02:32 +02:00
Doron Somech
c30da71735 Merge pull request #2156 from yasirs/patch-WSL
Patch for compatibility with Windows subsystem for linux
2016-10-09 09:01:24 +03:00
yasirs
36af3edee2 Update tcp_address.cpp 2016-10-09 00:48:35 -04:00
Doron Somech
9780945d7c Merge pull request #2152 from t-b/fix_socket_docu
Problem: Invalid markup in zmq_socket.txt
2016-10-07 17:40:37 +03:00
Thomas Braun
a151ac5936 Problem: Invalid markup in zmq_socket.txt
Solution: Fix it.
2016-10-07 16:37:30 +02:00
Doron Somech
7f8c17b124 Merge pull request #2150 from bluca/request
Problem: a request
2016-10-04 17:59:30 +03:00
Luca Boccassi
c592897f60
Problem: a request
Solution: honor it
2016-10-04 15:48:12 +01:00
Luca Boccassi
075dd6a003 Merge pull request #2148 from WGH-/doc-router-mandatory-block
doc/zmq_socket.txt: clarify that ROUTER can be blocking
2016-10-03 22:21:38 +01:00
WGH
eb0e0dda4e doc/zmq_socket.txt: clarify that ROUTER can be blocking 2016-10-03 23:39:34 +03:00
Luca Boccassi
88e4cff948 Merge pull request #2147 from goodfella/fix-zmq-poller-poll-return
Fix zmq poller poll return
2016-10-01 11:44:08 +01:00
Nick Guiffrida
ffdb44ad2c Fix zmq_poll return code assert in tests/test_radio_dish.cpp 2016-09-30 21:50:31 -07:00
Nick Guiffrida
1a2d58e4e7 Add #ifndef ZMQ_HAVE_WINDOWS guard around unistd.h include 2016-09-30 21:30:04 -07:00
Nick Guiffrida
f3de534897 Do not assign rc to zmq_poller_destroy in zmq_poller_poll
* Doing so was zmq_poller_poll to always return 0.
2016-09-30 21:10:25 -07:00
Nick Guiffrida
f46e45c263 Include unitstd.h in src/stream_engine.cpp for close system call 2016-09-30 21:10:05 -07:00
Luca Boccassi
6c1669371a Merge pull request #2145 from minrk/zmq-poll-repeat
allow duplicate entries in zmq_poller_poll
2016-09-29 15:36:55 +01:00
Min RK
fb5a04e21d allow duplicate entries in zmq_poller_poll
This should restore full compatibility with earlier zmq_poll behavior.

It complicates things a little bit, as collisions must be detected, and when collisions are found:

- event masks must be merged
- pollitems, events arrays are no longer co-ordered

Reverts the recent zmq_proxy patch to workaround the lack of repeat-item support in zmq_poll that is now fixed.
2016-09-29 16:33:02 +02:00
Luca Boccassi
ae0676e80d Merge pull request #2144 from minrk/fix-poller
Resolve issues with zmq_poll and zmq_poller working together
2016-09-29 15:07:18 +01:00
Min RK
310dafbc75 zmq_poll returns 0 on timeout
not -1, ETIMEDOUT like zmq_poller
2016-09-29 15:44:31 +02:00
Min RK
718608ce94 socket_poller::wait returns only triggered events
Return value is the number of events found. This also propagates to the return value of zmq_poller_wait_all.

zmq_poller_wait was only returning events on the first-registered socket.
2016-09-29 15:21:52 +02:00
Constantin Rack
872f1e5a9d Merge pull request #2143 from minrk/avoid-duplicate-poller-proxy
avoid passing duplicate entries to zmq_poll
2016-09-29 13:30:15 +02:00
Min RK
c636147c98 avoid duplicate entries in zmq_poll
zmq_poller doesn't allow a socket to appear twice
2016-09-29 12:59:53 +02:00
Luca Boccassi
b0df7f1f17 Merge pull request #2141 from minrk/heap-alloc-poll-events
heap-allocate events in zmq_poller_poll
2016-09-28 15:27:55 +01:00
Min RK
53fb120687 heap-allocate events in zmq_poller_poll
variable-size array allocation is not allowed by some compilers
2016-09-28 15:17:57 +02:00
Luca Boccassi
55930f5e42 Merge pull request #2140 from minrk/zmq_poll_poller
Support all sockets in zmq_poll
2016-09-28 13:00:20 +01:00
Doron Somech
c0b1114944 Merge pull request #2138 from minrk/darwin-clock
only define clock macros on darwin if not already defined
2016-09-28 14:54:25 +03:00
Doron Somech
91e121c9d3 Merge pull request #2139 from minrk/update-poll-based-on-poll
update socket_poller when ZMQ_POLL_BASED_ON_SELECT
2016-09-28 14:54:02 +03:00
Min RK
bdcaa935b9 zmq_poll calls zmq_poller if available
enables zmq_poll on threadsafe sockets only supported in zmq_poller (radio, dish, etc.)
2016-09-28 13:53:57 +02:00
Min RK
e50a987650 update socket_poller when ZMQ_POLL_BASED_ON_SELECT
previous patch updated only the branch for ZMQ_POLL_BASED_ON_POLL, causing failed builds on Windows.
2016-09-28 13:52:56 +02:00
Min RK
978c5c3499 only define clock macros on darwin if not already defined
clang from Xcode 8 has these already defined, causing duplicate macro warnings
2016-09-28 13:52:27 +02:00
Constantin Rack
c751899313 Merge pull request #2136 from bluca/copyright
Problem: Brocade has copyright but not in AUTHORS and RELICENSE
2016-09-28 05:49:56 +02:00
Constantin Rack
2768df845c Merge pull request #2135 from bluca/unbreak-pkg-config
Problem: pkg-config Requires.private is broken
2016-09-28 05:17:25 +02:00
Luca Boccassi
2204cb48dd
RELICENSE: Brocade Communications Systems Inc. MPLv2 grant 2016-09-27 23:43:02 +01:00
Luca Boccassi
00239414b3
Problem: Brocade has copyright but not in AUTHORS
Solution: add it. Some of the work that I do happens during working
hours and hence the copyright belongs to my employer, Brocade
Communications Systems Inc. Note this in the AUTHORS file.
2016-09-27 23:42:52 +01:00
Luca Boccassi
06d810b4c9 Problem: pkg-config Requires.private is broken
Solution: use only Libs.private to avoid breaking application builds.
Even though Requires.private are supposed to be parsed only if
pkg-config is called with --static, the --cflags parameter is enough
to trigger the parsing, causing build failures for applications that
do not (and should not) depend on libzmq's dependencies.
2016-09-27 23:34:35 +01:00
Constantin Rack
34a1292e96 Merge pull request #2134 from bluca/pkg-config-static
Problem: pkgconfig file does not support static link
2016-09-27 22:39:55 +02:00
Luca Boccassi
6d9411607d Problem: pkgconfig file does not support static link
Solution: add dependencies, if necessary, to the .private Libs and
Requires field of the pkgconfig file at build time.
This way pkg-config --static --libs libzmq will correctly print
dependencies if they were used to build the static libzmq.a library.
2016-09-27 18:39:07 +01:00
Doron Somech
131a2627b9 Merge pull request #2131 from minrk/poller-static-2
pass through poller events
2016-09-27 16:00:37 +03:00
Min RK
ec750732d4 pass through poller events
instead of allocating a new, identical array and copying the data.

This is only safe while zmq_poller_event_t and zmq::socket_poller_t::event_t are the same struct,
which they presumably will remain.
2016-09-27 14:59:07 +02:00
Doron Somech
06aeb47d73 Merge pull request #2130 from minrk/poller-static-alloc
add n_events argument to zmq_poller_wait_all
2016-09-27 15:39:33 +03:00
Min RK
de7fc1fcf8 add n_events argument to zmq_poller_wait_all
avoids unnecessary heap allocations, races on the number of items
2016-09-27 14:37:52 +02:00
Doron Somech
187b4bff48 Merge pull request #2128 from minrk/multi-event-poller
Problem: zmq_poller only signals one event
2016-09-27 14:45:03 +03:00
Min RK
2bc9796651 Problem: zmq_poller only signals one event
Solution: zmq_poller_wait_all signals all events

allows signaling multiple events with one call to zmq_poller_wait_all
rather than emitting only one event.

this prepares for zmq_poll being based on zmq_poller,
which requires events for all sockets rather than just one.
2016-09-27 13:39:16 +02:00
Laughing
555a087763 fix bugs of the pollset (#2127)
* fix bugs of the pollset

1. extend 'fd_table' when fd_ is greater or equal than the size of 'fd_table';
2. delete specific fd from pollset before reset pollin or pollout according the description of AIX document

* fix bugs of the pollset

edit error. remove extra spaces and paste fault

* fix bugs of pollset

remove character '-' at the end line.
2016-09-27 08:44:54 +01:00
Constantin Rack
113d3ffc0b Merge pull request #2126 from paddor/master
fix markup syntax on zmq_tipc(7) page
2016-09-25 19:23:36 +02:00
Patrik Wenger
7e07ff3e5b fix markup syntax on zmq_tipc(7) page 2016-09-25 19:19:13 +02:00
Luca Boccassi
2e55bc5838 Merge pull request #2125 from GreatFruitOmsk/master
Fix fd_entry may reference invalid object.
2016-09-25 11:07:26 +01:00
Ilya Kulakov
06614a394d Fix fd_entry may reference invalid object.
fd_entries (std::vector) can reallocate underlying storage
which will render reference invalid.
2016-09-24 21:17:32 -07:00
Constantin Rack
22dac19429 Merge pull request #2123 from bluca/dealer_router_async
Problem: zmq_ctx_term asserts with connect-before-bind and sockets with identity over inproc transport
2016-09-24 20:56:19 +02:00
Luca Boccassi
ab5c8c8dea Problem: zmq_ctx_term segfaults with too many pending inproc connects
Solution: add a zmq_assert to check if the ephemeral sockets created
to drain the queue of pending inproc connecting sockets was allocated
successfully.
2016-09-24 18:59:29 +01:00
Luca Boccassi
fab846a5e5 Problem: zmq_ctx_term asserts with connect-before-bind and sockets with identity over inproc transport
Solution: check if the connecting inproc socket has been closed
before trying to send the identity.
Otherwise the pipe will be in waiting_for_delimiter state causing
writes to fail and the connect to assert when the context is being
torn down and the pending inproc connects are resolved.
Add test case that covers this behaviour.
2016-09-24 18:59:29 +01:00
Luca Boccassi
25402335fd Problem: no bind-after-connect TCP test
Solution: add one to increase coverage
2016-09-24 18:27:19 +01:00
Luca Boccassi
55244935c2 Merge pull request #2122 from gena-moscow/master
Problem: Pub socket crashes on client disconnect.
2016-09-23 13:53:55 +01:00
Gennady Makovetski
2e3888dd45 Problem: Pub socket crashes on client disconnect. family_entry.fd_entries [i] is modified in zmq::select_t::rm_fd()
Solution: do not copy family_entry.fd_entries [i]
2016-09-23 15:26:36 +03:00
Constantin Rack
e30ab69738 Merge pull request #2121 from paddor/master
Problem: documentation markup unrecognized
2016-09-21 21:50:20 +02:00
Patrik Wenger
18e0451092 Problem: documentation markup unrecognized
The effect can be seen on http://api.zeromq.org/4-2:zmq-getsockopt at
options ZMQ_USE_FD and ZMQ_RATE.

Solution: fix length of squiggly line under option title
2016-09-21 21:39:01 +02:00
Luca Boccassi
bacba21ef2 Merge pull request #2120 from hnwyllmm/pollset
Pollset-change the position of `pollset`
2016-09-21 07:57:36 +01:00
hnwyllmm@126.com
bdf887fd74 move macro define ZMQ_USE_POLLSET to the position between ZMQ_USE_DEVPOLL and ZMQ_USE_POLL 2016-09-21 11:41:35 +08:00
hnwyllmm@126.com
55442699ef replace tabs with space 2016-09-21 11:28:32 +08:00
hnwyllmm@126.com
eee7880752 move the pollset to the position between devpoll and poll 2016-09-21 11:24:26 +08:00
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