1742 Commits

Author SHA1 Message Date
Martin Hurton
160a7efae4 Adjust number of sent messages on hiccups
Not adjusting the sent message count may lead to situation when SUB
socket does not forward its subscriptions.
2015-02-20 09:13:47 +01:00
Thomas Rodgers
73fa40b9ac resolve #1347 addresses issue of no metadata on identity frame 2015-02-19 13:31:26 -06:00
Thomas Rodgers
2a3379af4d Revert "resolve #1347 addresses issue of no metadata on identity frame"
This reverts commit f75ed8565e984f423e748717108486b458d5a724.
2015-02-19 13:27:18 -06:00
Thomas Rodgers
f75ed8565e resolve #1347 addresses issue of no metadata on identity frame 2015-02-19 13:26:26 -06:00
Thomas Rodgers
d172875f52 Backport resolve #1357 Support limited metadata for STREAM sockets 2015-02-18 13:09:11 -06:00
Thomas Rodgers
48ed789c18 Revert "STREAM socket support for limited metadata"
This reverts commit 5afd4e16edb51a3996c8d4b9f698dea8d2917c43.
2015-02-18 12:36:21 -06:00
Thomas Rodgers
c6d5c965fa Revert "Remove debugging cruft"
This reverts commit bbecdf397e0661ff469eb4898008c09d00efc397.
2015-02-18 12:36:19 -06:00
Thomas Rodgers
a69a043e14 Revert "Add connector.close() back"
This reverts commit 5e60f18d3a68947f469346162deae7e65732ba50.
2015-02-18 12:36:13 -06:00
Thomas Rodgers
5e60f18d3a Add connector.close() back
Needed if session->push() ever fails
2015-02-18 11:17:41 -06:00
Thomas Rodgers
bbecdf397e Remove debugging cruft 2015-02-18 11:14:23 -06:00
Thomas Rodgers
5afd4e16ed STREAM socket support for limited metadata
WIP - STREAM socket support for limited metadata

STREAM socket support for limited metadata
2015-02-18 11:12:32 -06:00
Thomas Rodgers
5229eeef5b resolve #1347 Backport zmq_msg_gets "Peer-Address" 2015-02-14 10:44:52 -06:00
Topher Brown
89dd9fddaf close (clean up) unsendable messages 2015-01-22 16:56:30 -05:00
Pieter Hintjens
583a5f9601 Merge pull request #14 from metadings/master
Upgrading zmq_msg_t to 64 bytes
2015-01-14 13:31:24 +01:00
metadings
d206fe2d45 Upgrading zmq_msg_t to 64 bytes 2015-01-14 13:26:48 +01:00
Thomas Rodgers
8f236dc55e resolve #1296 Remove of ZMQ_IDENTITY_FD socket option
Revert "linking fd to pipe identity via socket option"

This reverts commit fe3e8c5c70dc3fbcb0244c5f4c52dcd71b80f858.

Conflicts:
	include/zmq.h
	src/pipe.hpp
	src/session_base.cpp
2015-01-09 18:14:22 -06:00
Min RK
14c94c0df9 add session->zap_enabled()
checks mechanism != NULL, or NULL + non-empty zap_domain
2014-12-04 13:42:15 +01:00
Min RK
56e09c80f8 reject old ZMTP connections if auth enabled
auth mechanisms were only enabled when ZMTP handshake
is latest version, meaning that connections from old sockets
would skip authentication altogether
2014-12-04 13:42:07 +01:00
lysyloren
ed6bf9f178 Unbind socket with real endpoint when binding by wild-card * address 2014-10-29 10:17:30 +01:00
Martin Hurton
03c35d2659 Fix issue #1224 2014-10-23 10:28:19 +02:00
Phillip Mienk
6f9ad96225 Remove local pgm configuration option, cleanup configure.ac, remove unused Makefile.am instances. 2014-10-15 18:33:33 -07:00
Pavel Pimenov
18ee219ce7 Fix V815 Decreased performance. Consider replacing the expression 'peer_address = ""' with 'peer_address.clear()'. stream_engine.cpp 99 2014-10-09 09:41:49 +04:00
Pavel Pimenov
0e3d40c806 Fix V815 Decreased performance. Consider replacing the expression 'options.socks_proxy_address != ""' with '!options.socks_proxy_address.empty()'. session_base.cpp 497 2014-10-09 09:40:59 +04:00
Pavel Pimenov
0b541b789a Fix V803 Decreased performance. In case 'it' is iterator it's more effective to use prefix form of increment.
Replace iterator++ with ++iterator. stream_engine.cpp
    http://www.viva64.com/en/d/0165/print/
2014-10-09 09:37:55 +04:00
Dan Mick
8fde2d646c src/Makefile.am: libzmq.vers must go in dist tarball
Signed-off-by: Dan Mick <dmick@redhat.com>
2014-10-01 20:49:38 -07:00
Dan Mick
91cc9a2fd0 src/Makefile.am: i_properties.hpp removed some time ago
Signed-off-by: Dan Mick <dmick@localhost.localdomain>
2014-10-01 15:39:03 -07:00
Michaël Paul
7c5906d138 Problem : Build failed with MinGW on windows 2014-09-24 15:46:43 +02:00
Matthew Hawn
0900a48921 Problem: curve messages can be replayed
Solution: ensure message short nonces are strictly increasing and validate them
2014-09-19 18:07:57 -06:00
Martin Hurton
fe4396c597 Merge pull request #1188 from hintjens/master
Problem: stream_engine.cpp security can be downgraded
2014-09-19 20:16:09 +02:00
Pieter Hintjens
77f14aad95 Problem: stream_engine.cpp security can be downgraded
Solution: accept only the mechanism defined by the socket options.

I've not tested this yet, so it's a speculative fix.
2014-09-19 19:24:45 +02:00
Jim Hague
94943bab3b Fix hang terminating PGM ZMQ_SUB (#822). 2014-09-17 17:21:44 +01:00
Huu Nguyen
5642366f10 Fix non-constant-expression narrowing
For OS X, the microseconds field is implemented as an int type. The implicit narrowing in the initializer list throws a compiler error for some compilers with C++11 support turned on. The specific error message is: "error: non-constant-expression cannot be narrowed from type 'long' to '__darwin_suseconds_t' (aka 'int') in initializer list [-Wc++11-narrowing]".

Tested on Clang 5.1.0 and Mac OS X 10.9.4.
2014-09-16 14:34:11 -07:00
Martin Hurton
50e0915f98 Stop session's timer when pipe terminates 2014-09-12 16:53:05 +02:00
Martin Hurton
5a497d7d0c Code cleanup 2014-09-11 16:01:56 +02:00
Jonathan Reams
d1881acbdc Clean up after using randombytes from libsodium
When Curve authentication is used, libsodium opens a file
descriptor to /dev/urandom to generate random bytes. When
the ZMQ context terminates, it should ensure that file gets
closed.
2014-08-31 13:30:44 -04:00
Pieter Hintjens
f15146b5d2 Problem: nodrop code is ugly
It's bad practice to start by testing all exceptional conditions
and then dropping through to the 'normal' condition. Apart from
being inefficient, it's deceptive to the user. Conditional code
should always try to show the natural expectation of the code,
with exceptional cases coming last.

Solution: clean up this code.
2014-08-27 13:51:25 +02:00
Pieter Hintjens
35040aaf18 Problem: issues with nodrop property
- not initialized before use
- name is nasty (boolean variables should not have negative names)

Solution: rename to 'lossy' and initialize to 'true'.
2014-08-27 12:06:54 +02:00
Martin Hurton
f550d66ae3 Code cleanup 2014-08-14 08:58:01 +02:00
Kapp Arnaud
fbdc5aa22d Add const qualifier to source parameters in zmq_z85_decode and zmq_z85_encode 2014-08-14 00:00:00 +02:00
Martin Hurton
a54d8d7b0c Reset metadata for outbound messages 2014-08-13 08:53:54 +02:00
Pieter Hintjens
75d4f50be3 Problem: ZMQ_CURVE_SECRETKEY reads beyond end of Z85 data
Solution: change setsockopts on printable keys to expect 41, nor 40
bytes. Code still accepts 40 bytes for compatibility, and copies the
key to a well-terminated string before using it.

Fixes #1148
2014-08-12 12:37:49 +02:00
Martin Hurton
214553972d Return -1 when failed to publish message 2014-08-12 10:51:37 +02:00
Martin Hurton
228426ac44 Code cleanup 2014-08-12 09:31:19 +02:00
kreuzberger
f042ea9e26 better naming of flags and variables to real functionality: nodrop 2014-08-08 19:45:41 +02:00
kreuzberger
d9a3cc48d4 do not silently drop messages in publisher if hwm is reached 2014-08-08 19:36:00 +02:00
Thomas Rodgers
03f097a541 Update zmq_msg_get(ZMQ_SHARED) to return true for type_cmsg messages 2014-07-29 13:43:38 -05:00
KIU Shueng Chuan
6bcced7537 use enum retired_fd instead of -1 2014-07-29 04:16:44 +08:00
Ewen McNeill
501666d07e z/OS: Skip pthread_{get,set}schedparam
Updated:
    src/thread.cpp: On older z/OS UNIX System Services,
        pthread_{get,set}schedparam is not present (searching the
        Internet suggests it may be present in later version than
        the one being used for z/OS UNIX System Services porting).

        Make zmq::thread_t::setSchedulingParameters() a no-op on
        z/OS UNIX System Services.

    NOTE: pthread_{get,set}schedparam appear to have been introduced
    by POSIX.1-2001 or IEEE 1003.1-2004 so may not be universally
    available, and thus more platforms may need this "no-op" treatment.
2014-07-24 13:54:21 +12:00
Ewen McNeill
217e0ae9c6 Remove "const" from std::map key
Updated:
    src/metdata.hpp: Remove explicit "const" from key of std::map<>
       because the key is implicitly const already (see
       http://en.cppreference.com/w/cpp/container/map and
       http://www.cplusplus.com/reference/map/map/).

On some platforms (such as z/OS UNIX System Services) explicitly
declaring the map key as "const" causes template expansion errors
as it tries to create separate allocators for "const const std::string"
and "const std::string" only to find that they clash.  (Presumably
some compilers collapse these into one earlier.)

There are no template expansion errors if the map key is left to be
implicitly const.
2014-07-24 12:26:13 +12:00
Ewen McNeill
0af693c496 z/OS: Loop on EAGAIN on close() in ~signaler
Updated:
    src/signaler.cpp: Add close_wait_ms() static function to loop
       when receiving EAGAIN in response to close(), with ms long
       sleeps, up to a maximum limit (default 2000ms == 2 seconds);
       used in signaler_t::~signaler_t() destructor.
2014-07-23 14:01:43 +12:00