1474 Commits

Author SHA1 Message Date
Jean-Christophe Fillion-Robin
9df7ed0740 place a ZMQ_UNUSED macro and replace all unused variables with ZMQ_UNUSED macro
Backported from zeromq/libzmq@bff2284

# Conflicts:
#	src/client.cpp
#	src/server.cpp
2016-01-30 03:42:29 -05:00
Josh Blum
43b9d9d619 Fix C linkage for public symbols MSVC
The header symbols are declared extern "C",
however the the implementations are compiled in a C++ source.
The result is that the library symbols get C++ name mangled
and the resulting dll is missing all of the symbols from the header.
The fix was to add extern "C" in zmq.cpp and zmq_utils.cpp
2016-01-23 01:25:01 -08:00
Richard Newton
fb6a0b24f7 Merge pull request #107 from minrk/backport-721
backport stream socket empty frame fix
2015-08-02 19:23:48 +01:00
Dylan Cali
d2574dd45f backport zeromq/libzmq@09e7416
fixes zmq_unbind failing for wildcard endpoints
2015-06-28 23:26:19 -05:00
Dylan Cali
f1cec450db backport zeromq/libzmq@54e0fde
fixes zmq_unbind failing with ENOENT
2015-06-28 23:25:48 -05:00
Min RK
3d6f11e56d backport stream socket empty frame fix
backport of zeromq/libzmq#721

In the discussion, it was decided to backport, but that never actually happened.

test file was renamed after the above PR, so the version from master is pulled in here.
2015-06-07 11:20:27 -07:00
Min RK
9de7eeb467 don't check POLLOUT for single-socket proxies 2015-06-07 11:14:25 -07:00
Min RK
0f10ef1b38 fix scope of itemsout poll
indentation was correct, but poll was inside `if control`,
causing it to only be called if there is a control message.

This would cause proxy messages to only be delivered after a control message had been sent.
2015-06-05 13:45:10 -07:00
Rik van der Heijden
95019b00a0 Fix another degradation, CPU maxes out when POLLOUT is set because poll exits on POLLOUT and doesn't wait for POLLIN 2015-05-27 14:14:37 +02:00
Rik van der Heijden
683059d3a2 Fix degradation from #1382, POLLOUT was tested but not requested 2015-05-24 22:37:24 +02:00
Rik van der Heijden
4bba965d98 Problem: zmq_proxy_steerable didnt act on PAUSE/RESUME (fixes issue #88) 2015-05-01 20:57:40 +02:00
Rik van der Heijden
8a9fece30a Backport zeromq/libzmq#1382: Do not send data to backend when there are no listeners (+ test) 2015-05-01 20:51:37 +02:00
Martin Hurton
a1d1222dcc pub: Don't delay pipe termination 2015-05-01 08:43:53 +02:00
Martin Hurton
812c2016b1 push: Don't delay pipe termination 2015-05-01 08:43:49 +02:00
Pieter Hintjens
b589fb98b8 Problem: shutdown asserts if WSASTARUP wasn't done previously
This is a silly assertion that causes problems if libzmq.dll is
called in some esoteric ways.

Solution: if the shutdown code detects WSANOTINITIALISED, then
exit silently.

Fixes #1377
Fixes #1144

Conflicts:

	src/signaler.cpp
2015-04-21 23:27:54 +02:00
Martin Hurton
d8d9d17b21 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:12:25 +01:00
Pieter Hintjens
77ef79e3b5 Problem: issue #1273, protocol downgrade attack
Solution: backport fix from libzmq master. Also backported test
cases.
2014-12-05 09:08:02 +01:00
Pieter Hintjens
d73b240880 Merged patch for #1190 2014-09-20 10:37:18 +02:00
Jonathan Reams
16b2db6062 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 14:02:57 -04:00
Ewen McNeill
f35d0b6f8d 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-24 11:11:54 +12:00
Olaf Mandel
eaf732c25e Fix failed assertion for WSAENOTSOCK
In de9eef306, the error number assigned to WSAENOTSOCK was EFAULT, but
zmq.cpp:919 expects an ENOTSOCK in this case.
2014-06-10 15:06:27 +02:00
Olaf Mandel
2c754fc0a9 Extend zmq::wsa_error_to_errno()
The list of error codes is taken from zmq::wsa_error_no(). Most of the
new WSA error codes result in EFAULT, but some return a more specific
value (even EAGAIN).

Backport of zeromq/libzmq#1072
2014-06-04 17:41:03 +02:00
Olaf Mandel
d4d26b1cc0 Fix race condition in connecting inproc sockets
This is a backport of libzmq:3678c32b9
by Martin Hurton <hurtonm@gmail.com>
2014-05-21 17:02:01 +02:00
Olaf Mandel
550c32ed10 Fix identity handling for inproc transport
Fixes #872

Backport of hurtonm/libzmq@a09407829; included as
zeromq/libzmq@e376ad278 in development repos.
2014-05-12 15:21:56 +02:00
Maarten Ditzel
488cf5e04c Merge branch 'master' of https://github.com/zeromq/zeromq4-x 2014-04-14 13:36:27 +02:00
Maarten Ditzel
75fbd4f8d6 Fix issue #75 2014-04-14 11:01:49 +02:00
Martin Hurton
2ae11cdc8d 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 20:37:10 +02:00
KIU Shueng Chuan
c1b055a6d8 fix: win32 tcp_keepalive gets set even when option is -1 2014-03-25 07:12:06 +01:00
Cosmo Harrigan
e0f718bbd2 Backport zmq_proxy_steerable and fix error in proxy function prototype. 2014-03-17 17:55:59 -07:00
Pieter Hintjens
7f08204e9f Source package did not build 2014-03-10 22:40:48 +01:00
Josh Blum
dd5603d6e9 Updated NEWS for #909 2014-03-03 12:09:40 +01:00
Richard Newton
c7a7de12a3 Backported fix for #888 2014-02-13 14:56:09 +00:00
Pieter Hintjens
e655fd138d Merge pull request #57 from Debian/counter
Fix timestamp counter on s390/s390x
2014-02-05 21:11:10 +01:00
Alessandro Ghedini
4b9cd7764a Only export zmq_* symbols 2014-02-05 20:43:13 +01:00
Alessandro Ghedini
2493a99735 Fix timestamp counter on s390/s390x
Fixes #811
2014-02-05 20:42:40 +01:00
Pieter Hintjens
830e022987 Fixed #868 2014-02-03 11:22:22 +01:00
Eric Cornelius
63fe43a101 Corrects ypipe initialization when conflate is NOT enabled. Fixes LIBZMQ-584 2014-01-15 12:18:50 -08:00
AJ Lewis
047bd130cf Fix LIBZMQ-576 - Revert "Merge pull request #510 from miniway/master"
This reverts commit f27eb67e1abb0484c41050e454404cce30647b63, reversing
changes made to a3ae0d4c16c892a4e6c96d626a7c8b7068450336.

Conflicts:
	src/stream_engine.cpp

Conflicts were around additional defaults to the constructor after the
'terminating' default.  The additional defaults were left alone, and
the 'terminating' default was removed.
2014-01-02 11:04:43 -06:00
Alex Grönholm
2ba0d159b5 Fixed setting TCP keepalive parameters on Windows 2013-12-23 13:16:18 +01:00
KIU Shueng Chuan
3dc89feafc use enum retired_fd instead of -1
using -1 causes a warning on Windows platform because SOCKET is unsigned.
2013-12-05 16:50:15 +01:00
Martin Hurton
ff8f97e7d7 Fix issue #763 2013-12-01 11:53:12 +01:00
KIU Shueng Chuan
589bf436dd remove all asserts during critical section
the size of the critical section is reduced by only entering the critical
section right before the bind().
2013-11-19 11:00:39 +01:00
KIU Shueng Chuan
e54e55835e return error to caller on bind error 2013-11-19 11:00:28 +01:00
psl-felipefarinon
8f85bafe37 issue #583 removing C++11 code. 2013-11-19 10:58:20 +01:00
Bruno D. Rodrigues
f72dbb35d5 Fix socket creation above sistem limits for all 'other' OS not covered by eventfd, windows or vms; enhanced test to create sockets up to a bigger limit to really test hitting the OS limit 2013-11-19 10:55:48 +01:00
Martin Hurton
f6293d257d Signal that the peer performed orderly shutdown 2013-11-09 09:52:09 +01:00
Richard Newton
f33bdcf02e Fix formatting. 2013-11-09 09:52:08 +01:00
Richard Newton
bfc3deb43a Get maximum number of sockets it can handle from poller_t 2013-11-09 09:52:02 +01:00
psl-felipefarinon
dccf1dce1e Fixing broken build issue #583 2013-11-09 09:51:59 +01:00
psl-felipefarinon
27d20aacc7 Fixing issue #583. Using low resolution timer for clock::now_ms 2013-11-09 09:47:41 +01:00