1213 Commits

Author SHA1 Message Date
Mark Lakata
148427d291 Update stream_engine.hpp
The Intel compiler complains about the order of "static" and "const". The fix is a simple switch to one line in one header file.

In file included from ipc_listener.cpp(29):
stream_engine.hpp(97): error #82: storage class is not first
          const static size_t greeting_size = 12;
2015-03-09 17:19:52 -07:00
daveab
00e5b37420 Fix a race (to crash) when a message is sent as the last connection is lost.
Active is reduced in the zmq internal thread in terminated, potentially to zero.
If the user thread is in send() between lines 109 and 116, then the old code "(current+1) % active" is a divide by 0 - and crashes the program.
2014-04-25 16:14:16 +01:00
AJ Lewis
ea9af1cadb Fix LIBZMQ-576 - Revert "Merge pull request #76 from hintjens/master"
This reverts commit a0a24a92af78ebb8f61a8a45454d3ff6d2db0a3d, reversing
changes made to 8e748064acf877e5322f681c30323d7dc91e2100.

See https://zeromq.jira.com/browse/LIBZMQ-576 for details
2014-01-02 11:03:08 -06:00
Pieter Hintjens
84f00c06d6 Revert "zmq: add support for TIPC transport"
This reverts commit dbc42ee9af098183714845a75139997dcc34c7a0.
2013-11-06 20:22:06 +01:00
Richard Newton
2742c4afd4 Fix race condition on shutdown 2013-11-06 20:17:43 +01:00
Erik Hugne
dbc42ee9af zmq: add support for TIPC transport
A ZeroMQ application can opt for TIPC based sockets
using the TIPC port name format:
zmq_bind(sb, "tipc://{type,lower,upper}");
zmq_connect(sc, "tipc://{type,inst}");

'type' is the service ID, and 'lower/upper' can be
used for service partitioning or basic load
balancing.

ZeroMQ TIPC transport requires a kernel >= 3.8
(nonblocking connect support for TIPC).

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
2013-10-31 16:45:00 +01:00
Pieter Hintjens
2aca7b233b Merge pull request #99 from leewoosung/hotfixes/patched
Backport for LIBZMQ-541 fix
2013-07-15 00:52:12 -07:00
Christophe Juniet
20cce750fa Fix a few invalid forward declarations
A few forward declarations use mismatched struct and class types. Clang
won't compile this with -Werror.
2013-07-03 22:22:23 +02:00
WooSung
1b5b18cba9 LIBZMQ-541 fix 2013-06-27 23:20:14 +09:00
KIU Shueng Chuan
d7cad1b52a set SO_LINGER on first signaler socket to close in order to avoid
TIME_WAIT state.
2013-05-16 18:57:42 +02:00
KIU Shueng Chuan
573a1eab4b release critical section on failure to create signaler fdpair 2013-05-16 18:57:20 +02:00
Pieter Hintjens
a3dafd408f Code formatting 2013-05-02 22:09:30 +02:00
John Muehlhausen
58c1ba8994 patch for issue 456
Do not filter out duplicate subscriptions on the XSUB side of
XSUB/XPUB, so that ZMQ_XPUB_VERBOSE doesn't get blocked by forwarding
devices (as long as the devices all use ZMQ_XPUB_VERBOSE)
2013-05-02 22:09:21 +02:00
Trevor Bernard
69dbe0113a Back port fix for LIBZMQ-526
Fix syntax error
2013-05-01 10:31:28 -03:00
Steven McCoy
521ed91289 [#LIBZMQ-446] Silence error on setting PGM_TOS due to some platforms raising an error at runtime. Noted are RHEL 4. 2013-04-12 23:44:04 -04:00
Mika Fischer
1a17eb392e Work around for LIBZMQ-496
The problem is that other threads might still be in mailbox::send() when
it is destroyed. So as a workaround, we just acquire the mutex in the
destructor. Therefore the running send will finish before the mailbox is
destroyed.

See also the fix for LIBZMQ-281 in zeromq2-x.

Signed-off-by: Mika Fischer <mika.fischer@zoopnet.de>
2013-02-19 11:01:13 +01:00
Min(Dongmin Yu)
6a7dcfb898 LIBZMQ-497 there could be unsent bytes in encoder
When we send a large message, the message can be splitted into two chunks.
One is in the encoder buffer and the other is the zero-copy pointer.
The session could get the term before the last chunk is sent.
2013-02-01 10:03:55 +01:00
Ian Barber
92446d81ce Merge pull request #71 from hintjens/master
Backported fix for LIBZMQ-488
2012-12-27 06:16:08 -08:00
KIU Shueng Chuan
96ce417422 win32: close zmq-signaler-port-sync event object to avoid handle leak 2012-12-27 14:47:14 +01:00
Stefan Radomski
2131e85cd7 Break early when pipe to be removed was found 2012-12-04 17:41:08 +01:00
Stefan Radomski
fbfd3c34d9 Fixed iterator when erasing from inprocs multimap 2012-12-04 17:32:38 +01:00
Stefan Radomski
1965e2d05d Removal of terminated pipes from inproc and ignoring peer ends 2012-12-04 17:03:58 +01:00
Stefan Radomski
8e6fdc56e1 Changed errno to ENOENT for disconnecting unconnected endpoints 2012-12-04 14:14:46 +01:00
Stefan Radomski
b0563c2103 Set errno and update documentation on zmq_disconnect 2012-12-04 13:52:23 +01:00
Stefan Radomski
2388f27bfe Close inproc socket pairs on zmq_disconnect
This patch fixes LIBZMQ-476 and LIBZMQ-475
2012-12-04 13:14:56 +01:00
Victor Perron
6d4e2ce93b Change NULL to 0 to keep compatibility with some cross-compiling GCC
versions
2012-11-30 22:58:03 +01:00
Pieter Hintjens
bcf8916e17 Backported latest socket event framework 2012-11-23 16:42:13 +09:00
Martin Hurton
9120741719 Check decoder's state function for NULL before calling it
Fixes bug reported by Peter Friend
(http://lists.zeromq.org/pipermail/zeromq-dev/2012-November/019425.html)
2012-11-22 12:17:07 +09:00
John Muehlhausen
a7438de239 Issue 468
XPUB "verbose" mode excludes unsubscriptions
2012-11-16 10:59:37 +09:00
Lourens Naudé
c05a1b1f26 Backported fix for addresses on triggered events 2012-11-14 19:19:29 +09:00
Pieter Hintjens
30738e1123 Backported fix for ZMQ-465 2012-11-13 21:39:59 +09:00
Martin Hurton
50b6da0c1c Minor code cleanup 2012-11-13 21:39:41 +09:00
Martin Hurton
0c0a351fa5 Backported fix for ZMQ-465 2012-11-13 21:36:17 +09:00
Martin Hurton
50e9d72dc4 Resolve LIBZMQ-459
Ref: https://zeromq.jira.com/browse/LIBZMQ-459
2012-11-06 09:49:09 +01:00
Martin Hurton
fec6497976 Resolve LIBZMQ-464 2012-11-01 16:42:18 +01:00
Martin Hurton
5b9de45a89 Resolve LIBZMQ-447 2012-10-30 06:26:30 +01:00
Martin Hurton
d95f8c5f55 Resolve LIBZMQ-417
Ref: https://zeromq.jira.com/browse/LIBZMQ-417
2012-10-25 18:21:08 +09:00
AJ Lewis
888c1bdb5b Move socket_base.hpp and err.hpp after poll.h include
These two headers also include zmq.h somewhere in their dependency
chain, so must be included after poll.h is included for builds to work
on AIX.
2012-10-23 16:18:36 -05:00
Pieter Hintjens
5e4f858c8e Fixed issue #451 2012-10-19 15:10:34 +09:00
Pieter Hintjens
bdbdf8bb7e Fixed issue #449 2012-10-18 11:34:16 +09:00
Pieter Hintjens
2fe4a355fd Fixed issue #448 2012-10-18 11:10:21 +09:00
Pieter Hintjens
e18b69bfa1 Several include files were missing 2012-10-16 10:00:43 +09:00
Rohan
93a7a37893 fixed trailing whitespace 2012-10-11 09:32:54 -05:00
Rohan
a438e63498 explicit comments on multicast loopback 2012-10-10 16:22:52 -05:00
rohanbedarkar
11c22912d7 commented out TOS related opt for PGM 2012-10-10 10:08:06 -05:00
Pieter Hintjens
983ee761b1 Renamed ZMQ_ROUTER_BEHAVIOR to ZMQ_ROUTER_MANDATORY for clarity 2012-10-08 16:36:35 +09:00
Pieter Hintjens
f87bf38293 Fixed issue #443 2012-10-08 00:57:43 +09:00
Michel Pelletier
b84d0119b5 Ported from libxs revision 123c0f5387ecef287dd11f4dc790fb76ee1c0f67
Handle insufficient resources on accept() decently

    If accept() call fails due to insuffient OS resources
    the new connection is rejected.
2012-09-30 11:52:43 -07:00
Martin Hurton
82d7238f08 Make socket IO more robust
See also https://zeromq.jira.com/browse/LIBZMQ-433
2012-09-29 11:36:52 +02:00
Ivan Pechorin
725f141fd7 Fix LIBZMQ-211: REP socket asserting when getting malformed request
REP socket demands at least an empty address stack. The server asserted on (msg_->flags () & msg_t::more) in rep.cpp:75 when receiving a malformed request without empty part.

This patch makes a REP socket to discard and silently ignore such malformed requests.
2012-09-26 16:49:38 +04:00