Pieter Hintjens
ded00177b3
Revert "Add code to investigate data race"
...
This reverts commit 5e0facda17b986943f0fe40a2dc6c98611655c35.
2014-05-02 16:50:16 +02:00
Pieter Hintjens
0bc669b106
Merge pull request #1000 from daveab/feature/divide_by_zero_investigation
...
Feature/divide by zero investigation
2014-05-02 16:31:48 +02:00
dave b
5e0facda17
Add code to investigate data race
...
Provides control of race windows and logging for some of the interesting transitions.
2014-05-02 14:27:33 +01:00
Martin Hurton
8d82cc2a0b
Include ZMTP properties in message metadata
...
Metadata are built in stream_engine now.
This makes it easy to extend metadata with user-defined properties.
2014-05-02 12:45:14 +02:00
Martin Hurton
e95b477a87
Don't add empty metadata to received messages
2014-05-02 09:02:41 +02:00
Frank
e5a294ec02
tweetnacl integration
2014-05-01 21:30:02 +02:00
Martin Hurton
b9c2748146
Add metadata to received messages
2014-05-01 17:30:51 +02:00
Stoian Ivanov
fe3e8c5c70
linking fd to pipe identity via socket option
2014-04-30 16:34:55 +03:00
Pieter Hintjens
408dea796f
Merge pull request #993 from klnikita/src_addr_connect
...
Allow to set up a source address and port for outgoing tcp connections in zmq_connect
2014-04-30 14:57:08 +02:00
nikita kozlov
acb6807041
Allow to set up a source address and port for outgoing tcp connections in zmq_connect()
...
Few examples:
tcp:://192.168.0.4:55555;192.168.0.254:1234
tcp:://192.168.0.4:0;192.168.0.254:1234
tcp:://eth2:55555;192.168.0.254:1234
2014-04-30 14:43:37 +02:00
Martin Hurton
19c62b93fc
Define i_properties interface
...
- copy and move message operations are updated to maintain proper
reference count of properties object
- zmq_msg_gets updated to use i_properties interface to fetch property
value
- setter/getter added to msg_t class
2014-04-30 14:20:29 +02:00
Martin Hurton
f81a1304ff
Update function prototype for zmq_msg_gets ()
...
Added modifiers reflect the following properties:
- zmq_msg_gets () does not mutate property parameter
- zmq_msg_gets () returns a pointer to memory the caller should not
modify
2014-04-30 13:27:06 +02:00
Martin Hurton
724b2bb844
Add pointer to properties into message structure
2014-04-29 22:37:31 +02:00
Pieter Hintjens
39ccfea036
Added more scaffolding for security
...
- additional messages to help people debugging security errors
2014-04-29 22:21:58 +02:00
Pieter Hintjens
9753de8566
Problem: zmq_socket_monitor code is dirty
...
Specifically:
* zmq_event_t should not be used internally in libzmq, it was
meant to be an outward facing structure.
* In 4.x, zmq_event_t does not correspond to monitor events, so
I removed the structure entirely.
* man page for zmq_socket_monitor is incomplete and the example
code was particularly nasty.
* test_monitor.cpp needed rewriting, it was not clean.
2014-04-28 11:30:49 +02:00
Richard Newton
bbaa85e7dd
Fix windows non-unicode build
2014-04-27 13:29:20 +01:00
evoskuil
ca29709f38
Change TCHAR to Unicode, use safe swprintf to remove warning.
2014-04-25 00:43:47 -07:00
Chris Laws
7abf2564f8
fixes for gssapi build issue
2014-04-25 13:48:39 +09:30
Chris Laws
09647fa916
src/gssapi_client.cpp
2014-04-25 13:47:07 +09:30
Chris Busbey
d1334d9df8
using latest copyright header
2014-04-24 14:39:29 -07:00
Chris Busbey
634c8abe29
encrypt option on gss ready
2014-04-24 14:21:33 -07:00
Chris Busbey
27591d2da6
ZMQ_GSSAPI_PLAINTEXT option for disabling encryption
2014-04-24 14:21:33 -07:00
Chris Busbey
18da8a7402
encode and decode ready message
2014-04-24 14:20:54 -07:00
Chris Busbey
2e1645a519
principle->principal
2014-04-24 14:20:53 -07:00
Chris Busbey
87834dd63f
fixed up comments from pr
2014-04-24 14:18:58 -07:00
Chris Busbey
5441db3d7d
configurable principle and service principle (for client)
2014-04-24 14:18:58 -07:00
Chris Busbey
4e6880ec95
gss mech sends principle as part of zap request
2014-04-24 14:17:36 -07:00
Chris Busbey
be62be0fa4
gss encode/decode 'more' flag
2014-04-24 14:17:36 -07:00
Chris Busbey
778c72b9ed
:fixed client state transition bug
2014-04-24 14:17:36 -07:00
Chris Busbey
04db842dcc
added ready for meta data exchange at end of gss handshake
2014-04-24 14:17:36 -07:00
Mike Gatny
761508bf4b
Added comments to methods.
2014-04-24 14:17:36 -07:00
Mike Gatny
3c414c4aac
GSSAPI mechanism now fully working with encryption
2014-04-24 14:17:36 -07:00
Mike Gatny
eb2862525b
Methods to send/recv gssapi-wrapped messages
2014-04-24 14:17:36 -07:00
Mike Gatny
1445516c41
Establishing GSSAPI sec context is working now
2014-04-24 14:17:36 -07:00
Mike Gatny
6290ba168f
Added gss produce/process routines.
...
For exchanging tokens.
2014-04-24 14:17:05 -07:00
Mike Gatny
c00b8c347b
Refactored common impl into gssapi_mechanism_base.
...
E.g., both client and server need to produce and process GSSAPI tokens.
2014-04-24 14:17:05 -07:00
Mike Gatny
a4a0dc6644
Split up gssapi mechanism into client and server.
2014-04-24 14:17:05 -07:00
Mike Gatny
abcb224318
stubbed in TOKEN command
2014-04-24 14:17:05 -07:00
Mike Gatny
4b1c851db4
Stubbed in gssapi security mechanism.
2014-04-24 14:17:05 -07:00
Maarten Ditzel
802d1bcb03
Fix issue #971
2014-04-14 13:56:01 +02:00
Martin Hurton
a53d703160
Resolve issue #939
...
This bug is caused by fq which can terminate pipe before sending all
frames of a message first. So sometimes two messages were mixed and this
confused ZAP handler.
This patch just modifies one pipe parameter so that socket consumes all
messages before dropping the pipe.
2014-04-03 19:52:42 +02:00
Jan Kryl
48b37f217f
sockets created by accept are leaked to child processes (ticket #956 )
2014-04-02 12:25:40 -04:00
evoskuil
86ef40d171
Reorganize and clean up visual studio build configurations.
2014-03-29 23:13:00 -07:00
Pieter Hintjens
4706a18cf3
Merge pull request #945 from twwlogin/patch-2
...
Allow iov_base as char * on Solaris 8/9/10.
2014-03-21 12:13:42 +02:00
twwlogin
b7a663f1c1
Allow iov_base as char * on Solaris 8/9/10.
...
On Solaris 8, 9, 10/SPARC, iov_base is of type caddr_t which is char *. The Sun C++ compiler errors with "Cannot assign void* to char*". Using a static case to override this. On Solaris 11, HP-UX, AIX, and RHEL, iov_base is void * so no issues there. This seems a rather hackish solution so open to something better.
2014-03-21 01:32:01 -05:00
twwlogin
9051456f18
Include zmq.h after platform.hpp
...
zmq.h requires definitions from platform.hpp so include platform.hpp before zmq.h. This is only an intermediate fix though. zmq.h should not require definitions from platform.hpp because platform.hpp is not installed. So, when zmq.h wants to include <inttypes.h> on ZMQ_HAVE_SOLARIS || ZMQ_HAVE_OPENVMS, it will not and fall back to #include <stdint.h> which will fail when building something like pyzmq on Solaris 8, 9/SPARC which do not have <stdint.h>
2014-03-21 01:24:25 -05:00
V G
89cbd3d2fa
Fix building on MinGW64 Windows
...
Mingw64 provides mstcpip.h and the build fails (redefinition) if the struct tcp_keepalive is redefined. Do not define the struct if __MINGW64__ is defined. Note that I had to manually pass the compile definition to cmake: -D__MINGW64__=1
2014-03-20 12:22:15 -04:00
Pieter Hintjens
faacb1413f
Merge pull request #938 from bebopagogo/master
...
norm_engine update with no encoder_base_t::has_data() dependency
2014-03-20 07:22:57 +02:00
bebopagogo
cd9755e4aa
removed norm_engine dependency on deprecated encoder_base::has_data() method
2014-03-19 15:02:06 -04:00
bebopagogo
0a97e05439
removed dependency on deprecated encoder_base::has_data() method
2014-03-19 15:00:03 -04:00
Frank
8edc80f27b
cmake: fix fragile code related to HAVE_FORK macro
...
* report from Richard Newton indicated previous solutions was not
working on Windows
2014-03-18 21:07:45 +01:00
evoskuil
8782484fb5
Visual Studio 2013 build updates.
2014-03-17 23:57:48 -07:00
bebopagogo
43071bc724
fixed another missed norm_engine issue for non-norm build
2014-03-16 12:31:19 -04:00
Richard Newton
7cead2bfd6
Fix travis build.
2014-03-16 16:15:19 +00:00
Richard Newton
a4b0e93fc1
Fix travis build.
2014-03-16 16:01:47 +00:00
bebopagogo
d3e0be1528
added uncommitted norm_engine changes
2014-03-16 09:15:31 -04:00
bebopagogo
33f22d0d04
added norm_engine
2014-03-15 10:48:12 -04:00
bebopagogo
c91a638a5a
added norm_engine
2014-03-15 10:46:21 -04:00
Mark Barbisan
350a1ac12b
Allow TCP addresses to be re-resolved whenever there is a reconnection attempt
2014-03-12 13:28:37 -04:00
Pieter Hintjens
305a1442ae
Added scaffolding for zmq_msg_gets
2014-03-03 13:19:40 +01:00
Pieter Hintjens
8b7ac4ffdc
Merge pull request #902 from pavel-pimenov/fix-pvs-studio-v547
...
Fix build with ZMQ_HAVE_WINDOWS (typedef UINT_PTR fd_t; -> unsigned type...
2014-02-21 11:02:20 +01:00
Pavel Pimenov
acfbfe53bc
Fix build with ZMQ_HAVE_WINDOWS (typedef UINT_PTR fd_t; -> unsigned type)
...
V547 Expression 'file_desc >= 0' is always true. Unsigned type value is always >= 0. socket_base.cpp 845
V547 Expression 'file_desc >= 0' is always true. Unsigned type value is always >= 0. socket_base.cpp 863
V547 Expression 'file_desc >= 0' is always true. Unsigned type value is always >= 0. socket_base.cpp 897
http://www.viva64.com/en/d/0137/print/
2014-02-21 13:22:53 +04:00
KIU Shueng Chuan
acf0949f18
workaround missing Mstcpip.h in mingw32
2014-02-18 21:24:24 +08:00
KIU Shueng Chuan
9d3d9d635a
fix: win32 tcp_keepalive gets set even when option is -1
2014-02-18 14:17:32 +08:00
Pieter Hintjens
1879b8ba76
Merge pull request #899 from olafmandel/duplicate_poller_detect
...
Remove duplicate poller decision making
2014-02-17 16:07:31 +01:00
Olaf Mandel
48b50cefb4
Remove duplicate poller decision making
...
The decision about the poller mechanism to use (select, poll, ...)
was done twice: once by the build system and once by the code in
poller.hpp. As the build-system can actually detect the mechanisms
available, prefer that result to the hard coded defaults in
poller.hpp.
At the same time, remove the duplicate detection of select() vs.
poll()-variant from proxy.cpp, signaler.cpp and zmq.cpp.
This patch has not been tested on many build platforms: especially
the cmake build needs testing / patching. For the other builds,
hard code the result as these these are all Windows platforms.
2014-02-17 14:08:11 +01:00
Ian Barber
f789177abe
Merge pull request #898 from hintjens/master
...
Added temporary CURVE debugging support
2014-02-17 11:18:51 +00:00
Pieter Hintjens
8cca4735d8
Added temporary CURVE debugging support
...
- just prints server-side failures to console
- can be improved over time, e.g. enabled at build time or
sent to inproc debug channel
2014-02-16 20:19:46 +01:00
Olaf Mandel
e41c8cba0e
Rename ZMQ_MAX_SOCKETS_MAX to ZMQ_SOCKET_LIMIT
...
As per suggestion by Pieter Hintjens. Also update wording in
zmq_ctx_set manual a bit.
2014-02-14 10:09:19 +01:00
Pieter Hintjens
1e9ea54bf6
Merge pull request #889 from olafmandel/MAX_SOCKETS_MAX
...
Add ZMQ_MAX_SOCKETS_MAX to zmq_ctx_get()
2014-02-13 19:15:01 +01:00
Pieter Hintjens
af42d439cd
Merge pull request #890 from brunoqc/880
...
Fix a strict-aliasing with type-punning
2014-02-13 19:13:04 +01:00
Laurent Alebarde
abf9d8b74e
Revert "add a proxy hook"
...
This reverts commit 9ae6a91fadb96fd48038fde04cc3d4b61b49a8a1.
2014-02-13 18:35:09 +01:00
Laurent Alebarde
bc25366f7c
Revert "add proxy_chain, a multi proxies chaining in the same thread feature"
...
This reverts commit bc7441f5176589ad9a34dc2bde6b91d78a44e3e0.
2014-02-13 18:35:09 +01:00
Bruno Bigras
e8a13c44b0
Fix a strict-aliasing with type-punning
...
Fixes #880
2014-02-13 12:06:10 -05:00
Olaf Mandel
5815b768b9
Add ZMQ_MAX_SOCKETS_MAX to zmq_ctx_get()
...
The new options allows querying the maximum allowed number of sockets.
This is system dependent and cannot be encoded in the include file as a
preprocessor macro: for ZMQ_USE_SELECT, this depends on the FD_SETSIZE
macro at time of library compilation, not at time of include file use.
2014-02-13 15:54:06 +01:00
Pieter Hintjens
b54a168d41
Merge pull request #884 from guruofquality/cmake_fixes
...
fix libzmq.pc generation under cmake
2014-02-13 11:36:51 +01:00
Pieter Hintjens
c7ffef37bc
Merge pull request #886 from guruofquality/auto_fixes
...
fix autotools out of tree build link issue on linux
2014-02-13 10:03:55 +01:00
Richard Newton
12442a3d65
Bind pending connections on terminate outside lock.
2014-02-12 23:45:39 +00:00
Richard Newton
668c42fc26
Fix hang on term when inproc is connected but never bound.
2014-02-12 23:10:23 +00:00
Josh Blum
a5741ea2f5
fix autotools out of tree build link issue on linux
...
added srcdir to --version-script=$(srcdir)/libzmq.vers
2014-02-12 11:22:37 -08:00
Josh Blum
b1471da5ac
fix libzmq.pc generation under cmake
...
The ${libdir} was getting replaced/removed by configure_file() making pkg-config give bad flags: -L -lzmq
My fix was to add @ONLY to configure_file() so ${} style pkg-config substitutions are left alone.
In addition, I put the other typical ${} substitutions back into the libzmq.pc, since its now safe.
2014-02-11 15:46:38 -08:00
Pieter Hintjens
ab9349d3fe
Revert "Fix potential memory leak"
...
This reverts commit 50d34e5653ade4f3f1623c86f1426aeb746ae564.
2014-02-11 18:30:08 +01:00
Martin Hurton
a09407829e
Fix identity handling for inproc transport
...
Fixes #872
2014-02-09 21:02:00 +01:00
Alex Pyrgiotis
50d34e5653
Fix potential memory leak
...
Delete the socket if the initialization part of the socket creation
fails.
2014-02-03 18:03:25 +02:00
Alex Pyrgiotis
e6ef16d005
Fix potential segmentation fault
...
Call the allocation assertion macro before dereferencing the socket
pointer.
2014-02-03 17:35:53 +02:00
Pieter Hintjens
4f56631f78
Fixed issue #868
2014-02-03 11:16:49 +01:00
Pieter Hintjens
45b593e7ed
Whitespace fix
2014-02-03 11:03:59 +01:00
Pieter Hintjens
40d7ca6a60
Whitespace cleanups
2014-02-03 11:03:59 +01:00
Richard Newton
1fe82ae0a4
Merge pull request #866 from hintjens/master
...
Fixed issue #865 - validation on ZMQ_TCP_KEEPALIVE
2014-01-31 03:14:08 -08:00
Pieter Hintjens
bb81b1e3d9
Fixed issue #865 - validation on ZMQ_TCP_KEEPALIVE
2014-01-31 12:03:15 +01:00
Pavel Pimenov
5dd82a6fa6
[libzmq] const string p -> const string& p ( #860 )
2014-01-29 15:58:53 +04:00
Laurent Alebarde
bc7441f517
add proxy_chain, a multi proxies chaining in the same thread feature
2014-01-28 18:15:01 +01:00
Laurent Alebarde
9ae6a91fad
add a proxy hook
2014-01-24 16:52:30 +01:00
Pieter Hintjens
9c6aa1e9e0
Merge pull request #848 from Prarrot/master
...
Changed fail behavior of CONNECT_RID to an assert failure instead of silent failure.
2014-01-21 12:08:00 -08:00
Tim M
515af9b147
Added assert on duplicate id in ROUTER and STREAM sockets. Updated man to reflect this change. Modified test case to match.
2014-01-21 11:43:34 -08:00
Laurent Alebarde
5bc6737039
factorize code in proxy
2014-01-20 17:00:02 +01:00
Tim M
3fbc10eba7
Updated man entries, and added behavior in case the user duplicates peer ids. In this case the socket reverts to default behavior.
2014-01-19 17:28:13 -08:00
Tim M
1d9b76c860
Added test for ZMQ_CONNECT_RID
2014-01-19 15:59:43 -08:00
Tim M
2f36f65f8f
Fixed duplicate variable declaration.
2014-01-19 15:05:20 -08:00
Pieter Hintjens
50bd28c037
Cleaned up option to force identity on outgoing connection
...
- renamed to ZMQ_CONNECT_RID
- fixed whitespace malformating around previous patch
- renamamed next_peer_id to next_rid in preparation for
larger rename of IDENTITY to ROUTING_ID
Note: ZMQ_CONNECT_RID has no test case and no entry in the man
page, as yet.
2014-01-19 09:27:57 +01:00