Matt Bolger
7e09306cb3
-Set signaler_port to 0 which allows the OS to find a free port, rather than crashing if 5905 is in use ( https://github.com/zeromq/libzmq/issues/1542 )
...
-Added config.hpp to the source list so it shows up in generated projects
-Remove CMAKE_BUILD_TYPE setting for generators that don't use it
2015-08-21 13:45:59 +10:00
Joe Eli McIlvain
61217a2686
Problem: Source files contain mixed tabs and spaces.
...
Solution: Convert to spaces and remove trailing whitespace in these files.
2015-08-20 07:46:34 -07:00
David Jelenc
1240d7ac83
Fixes failing tests regarding XPUB sockets.
...
Fixes tests that were introduced in a previous pull request. See
https://github.com/zeromq/libzmq/pull/1539#issuecomment-132968987
2015-08-20 15:32:23 +02:00
David Jelenc
b9634e11a3
Addresses zeromq/libzmq#1116 .
...
This patch adds a new member of type deque to the
xpub class that contains pointers to metadata_t.
This deque is then used (alongside pending_data
and pending_flags) to preserve metadata when
copying messages.
2015-08-20 12:09:56 +02:00
Kapp Arnaud
370b8c9bb1
Problem: Identity frame from router has no metadata
...
The routing id (identity) frame return when reading from
a router doesn't have the same metadata as the "real"
message that follows.
For example, The ZAP "User-Id" property is missing.
This patch attach the "data message"'s metadata
to the "identity message" when it is read from the router.
2015-08-20 01:15:18 +02:00
somdoron
4da5ff6a7d
revert to original zmq_polland creating zmq_pollfd_poll for polling on pollfd
2015-08-17 18:57:47 +03:00
Constantin Rack
a96f16e3fa
Merge pull request #1534 from somdoron/master
...
problem: new poller field in zmq_pollitem_t is changing the api
2015-08-17 13:40:26 +02:00
somdoron
d83b045347
rename poller to pollfd
2015-08-17 14:20:49 +03:00
Constantin Rack
34fe5eaf26
Solution: explicitly set u.base.metadata to null
2015-08-17 12:41:27 +02:00
somdoron
5bae6911af
remove poller field, using fd instead
2015-08-17 11:56:23 +03:00
reza.ebrahimi
1621c25ef0
define a macro for heap object deletion in a unified manner (related to issue #1524 )
2015-08-17 00:35:11 +04:30
somdoron
6eddbd98bc
polling on thread safe sockets
2015-08-16 13:57:28 +03:00
somdoron
a63818904d
add methods to handle poller
2015-08-16 13:57:28 +03:00
somdoron
34968771ca
add an option to check if the socket is thread safe
2015-08-16 11:50:50 +03:00
reza.ebrahimi
8e6ef4616e
changing some camelCase variable names to snake_case in previous commit
2015-08-14 16:56:07 +04:30
reza.ebrahimi
d7b74d1f57
remove unnecessary multiple WSAGetLastError() calls
2015-08-14 16:29:18 +04:30
reza.ebrahimi
bff2284a50
place a ZMQ_UNUSED macro and replace all unused variables with ZMQ_UNUSED macro
2015-08-14 15:40:39 +04:30
Rik van der Heijden
c68e9a39bf
Merge fix for zeromq/zeromq4-1#52 , getsockopt ZMQ_RCVMORE now resets all bits
2015-08-11 21:37:50 +02:00
KIU Shueng Chuan
e129640471
fix: ZMQ_TCP_RETRANSMIT_TIMEOUT not applied to bind socket
2015-08-07 06:43:31 +08:00
Constantin Rack
84a93d4251
Merge pull request #1511 from sorenh/linger_fix
...
Avoid terminating connections prematurely
2015-08-06 20:45:45 +02:00
Soren Hansen
abc845d1af
Avoid terminating connections prematurely
...
While sending very large messages (far beyond what fits in a the tcp
buffer, so it takes multiple sendto system calls for it to finish),
zmq_close will close the connection regardless of ZMQ_LINGER.
In case no engine is attached, a pipe->check_read() is needed to look
for the delimiter in the pipe and ultimately trigger the pipe
termination.
However, if there *is* an engine attached, the check_read() looks ahead
and finds the delimiter and terminates the connection even though the
engine might actually still be in the middle of sending a message.
This happens because while the io_thread is still busy sending the data,
the pipe can get terminated and the io thread ends up being terminated.
2015-08-06 20:09:37 +02:00
KIU Shueng Chuan
c7f2cdd699
fix: Windows setsockopt needs char* cast
2015-08-07 00:05:13 +08:00
KIU Shueng Chuan
ca9215de1e
add ZMQ_TCP_RETRANSMIT_TIMEOUT socket option
2015-08-06 23:36:27 +08:00
KIU Shueng Chuan
eeb697b5ac
add connect timeout logic
2015-08-04 22:17:02 +08:00
KIU Shueng Chuan
c0ca2be642
add ZMQ_CONNECT_TIMEOUT socket option
2015-08-04 22:17:02 +08:00
KIU Shueng Chuan
4a0bde8130
rename timer_started to reconnect_timer_started
2015-08-04 22:17:02 +08:00
Joe Eli McIlvain
438b5207f6
Remove type-pun in zmq.cpp to resolve issue #1500 .
2015-08-02 08:27:07 -07:00
Pieter Hintjens
6dfe8f20e2
Merge pull request #1492 from brian-peloton/fix-memory-leak
...
Fix a documented memory leak.
2015-07-28 22:57:11 +02:00
Brian Silverman
62a0e45089
Fix eventfd read handling under heavy load.
...
I had the assertion below fail occasionally when running the libzmq
tests under heavy CPU load on linux 3.16.0-4-amd64.
2015-07-28 13:48:36 -07:00
Brian Silverman
97969808f6
Fix a documented memory leak.
...
Despite the old comments, re-initing the msg_t leaks a refcount to
metadata in some situations.
v1_decoder looks like it isn't tested any more, but it seems like a good
idea to fix it because it has the exact same piece of buggy code
v2_decoder does.
2015-07-28 13:48:13 -07:00
evoskuil
81aa6f45a4
Style and explicitness.
2015-07-26 17:37:38 -07:00
evoskuil
6f0efc092c
Make lossy cast explicit.
2015-07-26 17:37:28 -07:00
KIU Shueng Chuan
2182bc963d
check for potential unsigned integer wraparound before adding
2015-07-25 17:46:46 +08:00
KIU Shueng Chuan
3e7d737360
change ZMQ_STREAM_NOTIFY to default to 1
2015-07-24 05:21:53 +08:00
KIU Shueng Chuan
518b939f31
make ZMQ_STREAM_NOTIFY also control disconnect notificatons
2015-07-24 05:21:53 +08:00
Ricardo Catalinas Jiménez
ec5592db1f
Fix 1478: receive unsubscriptions in XPUB when verbose
...
Fixes not receiving unsubscription messages in XPUB socket with
ZMQ_XPUB_VERBOSE and using a XSUB-XPUB proxy in front.
This adds two modifications:
- It adds a new flag, ZMQ_XPUB_VERBOSE_UNSUBSCRIBE, to enable verbose
unsubscription messages, necessary when using a XSUB/XPUB proxy.
- It adds a boolean switch to zmq::mtrie_t::rm () to control if the
callback is invoked every time or only in the last removal. Necessary
when a pipe is terminated and the verbose mode for unsubscriptions is
enabled.
2015-07-23 12:02:34 +01:00
Richard Newton
91877a22d7
Fix windows build
2015-07-23 08:49:03 +01:00
Richard Newton
a4509d8f88
Merge pull request #1484 from pijyoi/fixsmash
...
fix #1447 Segfault or Abort after PR #1441
2015-07-23 08:26:15 +01:00
Giulio Eulisse
e2be0d25bd
Fix compilation on mac.
2015-07-22 21:31:48 +02:00
Brian Silverman
773a06fc23
Fix memory leak when creating a socket fails.
...
Previously, AddressSanitizer flagged leaks when running
tests/test_many_sockets.cpp.
2015-07-22 11:18:48 -07:00
KIU Shueng Chuan
708353a1b9
advance refcnt only if it was used
2015-07-22 21:19:22 +08:00
Brian Silverman
18791f2bfb
Fix several missing msg_t::close calls.
...
I traced memory leaks found using AddressSanitizer down to these.
2015-07-21 19:42:20 -07:00
Jens Auer
23797120ff
Fixed #1477 corruption in "zero-copy" raw_decoder for payloads larger than 8192 bytes #1477
...
Fixed wrong message::init arguments.
2015-07-20 22:22:13 +02:00
Constantin Rack
311f4d00e4
Merge pull request #1472 from reunanen/allow-explicitly-setting-buf-sizes-to-0
...
Allow explicitly setting buf sizes to 0
2015-07-08 11:20:45 +02:00
Juha Reunanen
f7b933f570
LIBZMQ-195 allow explicitly setting sndbuf and rcvbuf to 0 (see https://support.microsoft.com/en-us/kb/201213 )
2015-07-08 11:31:34 +03:00
Pieter Hintjens
72a94881de
Merge pull request #1471 from reunanen/retry-on-WSAENOBUFS
...
on Windows, handle WSAENOBUFS like WSAEWOULDBLOCK
2015-07-07 21:51:36 +02:00
Pieter Hintjens
adafdb8f4f
Merge pull request #1470 from reunanen/check-msg-type-in-rm_refs
...
add message type sanity check in msg_t::rm_refs
2015-07-07 21:50:35 +02:00
Juha Reunanen
ccb13e1732
add sanity check in msg_t::rm_refs in order to avoid invalid memory access with u.zclmsg.refcnt
2015-07-07 19:31:46 +03:00
Juha Reunanen
8339271a3e
LIBZMQ-195 on Windows, handle WSAENOBUFS like WSAEWOULDBLOCK
2015-07-07 13:38:10 +03:00
Thomas Köppe
29b45489fa
[decoder.hpp] Fix misspelled inclusion
2015-07-06 00:20:59 +01:00