Luca Boccassi
18cb7caeb2
Problem: v4-in-v6 mapped addresses cause parsing failure
...
Solution: in the address validator accept an endpoint that starts
with :, eg: ::ffff:192.168.0.1:12345 as it's a valid mapped
address.
2017-02-03 11:19:31 +01:00
laplaceyang
107f2441d5
Problem: Thread-safe solution for modify hwm of pipe
...
Solution: where change pipe hwm, send a command (new type pipe_hwm) to peer, so peer pipe can modify hwm thread-safely
2017-01-11 10:49:54 +08:00
Luca Boccassi
9f1ba60f50
Problem: modifying pipe from different thread is not safe
...
Solution: revert change from #2299 to avoid bugs while we look for an
alternative and thread-safe solution
2017-01-10 11:38:02 +00:00
laplaceyang
5adcb83509
Problem: set hwm after connect lead to infinite hwm
2017-01-09 12:34:40 +08:00
Patrik Wenger
1b3df75b87
fix typos
2017-01-03 12:45:33 +01:00
Vincent Tellier
48bc75e8a1
Code formatting + reverted hard error handshake fail
...
- Moved new events in draft section + added to zmq_draft.h
- Removed the remainning tabs
- Reverted the hard error (back to soft error) in curve_server.cpp
=> The feature doesn't works anymore
2016-12-30 18:34:33 +01:00
Vincent Tellier
b6e9e0c2d3
Fixed issue #2227
...
Added two new monitoring events:
- ZMQ_EVENT_HANDSHAKE_SUCCEED is raised once the encryption handshake succeed
- ZMQ_EVENT_HANDSHAKE_FAILED is raised when it failed
Both events are raised on server and client side.
2016-12-30 16:26:42 +01:00
Jens Auer
b031325996
Fixed problems from previous PR for #2158 ( #2160 )
...
* - Fixed windows build errors
- Extended monitor lock scope to prevent race-condition between
process_stop and monitor
* - Fixed windows build errors
- Extended monitor lock scope to prevent race-condition between
process_stop and monitor
2016-10-12 10:34:22 +01:00
Jens Auer
d1c7280d05
Add mutex for monitor socket
2016-10-11 13:28:45 +00:00
Luca Boccassi
53e5a9a6f9
Problem: zmq_connect with IPv6 "source:port;dest:port" format is broken
...
Solution: allow for '[' character when doing the basic sanity check
on the TCP endpoint.
Also add unit tests for both IPv4 and IPv6 source;dest format.
2016-09-17 20:04:40 +01:00
Constantin Rack
022cf2aeaa
Problem: source code contains tabs
...
Solution: replace tabes with spaces
2016-09-17 08:44:00 +02:00
a4z
a43f6ce0a6
Problem: scoped optional mutex lock caused unit tests to fail
...
Solution: Add a scope that scopegurad unlocks the mutex
before the object instance deletes itself and wants to unlock
a locked mutex
2016-09-04 16:18:07 +02:00
a4z
9201009f17
Problem: socket_base uses macros for mutex lock and unlock
...
Solution: add a lock guard that takes optional a mutex and use it
2016-09-04 10:11:47 +02:00
KIU Shueng Chuan
603cd1db88
change event monitoring functions to use zmq::fd_t
2016-06-20 22:27:52 +08:00
Yann Diorcet
9835e18f64
Fix compilation with mingw64 using autotools
2016-06-01 15:07:16 +02:00
somdoron
bbfed6b8d0
problem: memory issues, access uninitiailized memory and leak
2016-05-16 15:51:08 +03:00
somdoron
c4d0146f2c
problem: udp doesn't enforce correct usage of bind/connect
...
solution: enforce that dish and gram can only bind and radio can only
connect
2016-05-16 13:34:38 +03:00
Bitiquinho
365c8eda72
Add dgram_t class (based on stream socket and udp engine)
2016-05-15 15:35:35 -03:00
evoskuil
2b798e486a
Problem: name conflicts from windows.h, draft API declared in pch.
2016-05-13 20:41:26 -07:00
Doron Somech
c41d514b8b
Revert "problem:Socket try to access closed mutex"
2016-05-10 16:23:29 +03:00
Doron Somech
77d3d7b4dc
problem:Socket try to access closed mutex
2016-05-10 13:49:57 +03:00
Luca Boccassi
17132f0387
Problem: read-after-free when closing socket
...
Solution: use socket object's mutex before the send_reap() call that
might deallocate it
2016-05-05 17:47:16 +01:00
Doron Somech
a747f72450
problem:closed poller still associated with socket
2016-05-05 13:50:33 +03:00
Doron Somech
4012538ce4
problem: srcfd is broken
2016-05-04 15:33:19 +03:00
Luca Boccassi
95acb29bfb
Merge pull request #1934 from somdoron/master
...
problem: no documentation for Radio-dish and UDP
2016-04-29 10:40:56 +01:00
somdoron
34d5028ea8
allow specify binding address on radio with udp
2016-04-29 12:17:17 +03:00
hitstergtd
7feb1e49fc
Problem: Windows IPC check broken (check_protocol)
...
Solution: Fix the preprocessor check from || to &&
2016-04-22 19:55:08 +01:00
somdoron
e6dae56c6e
Scatter-Gather socket types
2016-04-21 14:50:58 +03:00
Luca Boccassi
c8211bf320
Problem: can't unbind with bound addr with IPv6
...
Solution: try to resolve the TCP endpoint passed by the user in the
zmq_unbind call before giving up, if it doesn't match.
This fixes a breakage in the API, where after a call to
zmq_bind(s, "tcp://127.0.0.1:9999") with IPv6 enabled on s would
result in the call to zmq_unbind(s, "tcp://127.0.0.1:9999") failing.
Add more test cases to increase coverage on all combinations of TCP
endpoints.
2016-04-18 18:43:36 +01:00
hitstergtd
8cb27316fa
Problem: check_protocol() logic duplicated twice
...
Problem:
Conditional logic in check_protocol() that checks if a protocol is supported,
is duplicated twice. Moreover, the first set of checks to ascertain if a
protocol is supported is done regardless of whether the particular protocol
will be built into the library or not.
Solution:
* Simplify/collapse all supported protocol checks into one in check_protocol()
* Enclose pgm/epgm/norm socket+protocol match checks with requisite macros
2016-04-15 15:39:46 +01:00
hitstergtd
362377948e
Problem: errno not set if UDP is NOT used with ZMQ_RADIO or ZMQ_DISH
...
Solution: set errno to ENOCOMPATPROTO in check_protocol()
2016-04-15 01:23:34 +01:00
Luca Boccassi
80e529a16a
Problem: all tests fail with assert in in_event
...
Solution: socket_base_t::in_event cannot do anything useful with
return status of process_commands. Asserting is the wrong solution,
as it is entirely valid to be interrupted or for the context to be
terminated, so discard the value.
2016-02-22 00:05:52 +00:00
Luca Boccassi
ae8efc21e8
Problem: nullptr is a reserved keyword in C++0x
...
Solution: use NULL instead to avoid build failure with older
compilers.
2016-02-21 23:54:18 +00:00
Luca Boccassi
c21dd8d6a2
Problem: socket_base_t initialization reorder
...
Solution: initialize class variable in the same order as they are
defined.
2016-02-21 23:41:02 +00:00
Luca Boccassi
d4c0716473
Problem: indentation should be 4 spaces, no tabs
...
Solution: fix it
2016-02-21 23:16:44 +00:00
Osiris
b3d5fa63a0
Problem: Several problems found by Coverity Static Analyzer
...
Solution: The Coverity Static Code Analyzer was used on libzmq code and found
many issues with uninitialized member variables, some redefinition of variables
hidding previous instances of same variable name and a couple of functions
where return values were not checked, even though all other occurrences were
checked (e.g. init_size() return).
2016-02-21 15:49:47 -06:00
Osiris
4a5af9d58b
Problem: Precompiled headers not being used
...
Solution: Phase I - make precompiled.hpp be first file included in every source file
2016-02-18 10:56:52 -06:00
somdoron
352ae1468f
remove using of dynamic cast
2016-02-17 19:33:17 +02:00
Pieter Hintjens
44c6b0484e
Revert "Revert "Problem: deprecated use and reference of zmq_term
""
2016-02-01 23:00:06 +01:00
Pieter Hintjens
1708bfefb7
Revert "Problem: deprecated use and reference of zmq_term
"
2016-02-01 22:41:51 +01:00
Constantin Rack
589464ced9
Problem: comments still refer to deprecated zmq_term
.
...
Solution: replace with `zmq_ctx_term`
Also fix whitespace (tabs instead of spaces)
2016-02-01 21:51:54 +01:00
Min RK
cdec4dc9ee
allow underscores in domain names
...
Since they are allowed
(They are not, however, allowed in hostnames)
2016-01-30 21:30:30 +01:00
Jean-Christophe Fillion-Robin
f329252dcb
Style: Fix unused parameter compilation warnings
...
This commit addresses the following warnings reported on gcc 5.2.1. In
the future, this will help reduce the "noise" and help catch warnings
revealing a serious problem.
8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
/path/to/libzmq/src/options.cpp:1048:36: warning: unused parameter ‘option_’ [-Wunused-parameter]
bool zmq::options_t::is_valid (int option_) const
^
/path/to/libzmq/src/plain_client.cpp:146:30: warning: unused parameter ‘cmd_data’ [-Wunused-parameter]
const unsigned char *cmd_data, size_t data_size)
^
/path/to/libzmq/src/plain_client.cpp:146:30: warning: unused parameter ‘cmd_data’ [-Wunused-parameter]
const unsigned char *cmd_data, size_t data_size)
^
/path/to/libzmq/src/socket_base.cpp:1445:44: warning: unused parameter ‘group_’ [-Wunused-parameter]
int zmq::socket_base_t::xjoin (const char *group_)
^
/path/to/libzmq/src/socket_base.cpp:1451:45: warning: unused parameter ‘group_’ [-Wunused-parameter]
int zmq::socket_base_t::xleave (const char *group_)
^
/path/to/libzmq/src/radio.cpp:145:33: warning: unused parameter ‘msg_’ [-Wunused-parameter]
int zmq::radio_t::xrecv (msg_t *msg_)
^
/path/to/libzmq/src/dish.cpp:164:32: warning: unused parameter ‘msg_’ [-Wunused-parameter]
int zmq::dish_t::xsend (msg_t *msg_)
^
/path/to/libzmq/tests/test_msg_ffn.cpp:32:16: warning: unused parameter ‘data’ [-Wunused-parameter]
void ffn(void *data, void *hint) {
^
/path/to/libzmq/tests/test_timers.cpp:50:19: warning: unused parameter ‘timer_id’ [-Wunused-parameter]
void handler (int timer_id, void* arg)
^
8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
2016-01-30 02:56:03 -05:00
somdoron
5ebfd1728f
make udp support for radio-dish
2016-01-29 21:17:11 +02:00
Constantin Rack
a539b0c6e8
Problem: copyright year is still 2015
...
Solution: update to 2016
2016-01-28 15:07:31 +01:00
somdoron
b8425a25cf
radio-dish pattern
2016-01-27 18:22:48 +02:00
Min RK
f0dce000b2
stop previous monitor socket before starting new one
...
avoids leaking sockets due to multiple monitor calls on one socket
Alternative: raise error (not sure what errno; EADDRINUSE?) if collision detected; force manual stop.
2016-01-21 16:21:07 +01:00
Ilya Kulakov
e7850410f8
Fix trailing spaces.
2016-01-21 13:44:15 +06:00
Ilya Kulakov
e5894d5197
Fix missing headers which makes compilation fail on Android.
2016-01-21 13:44:01 +06:00
Pieter Hintjens
2566c02a9e
Problem: CLIENT and SERVER don't check SNDMORE
...
These sockets don't handle multipart data, so if callers send it,
they drop frames, and things break silently.
Solution: if the caller tries to use ZMQ_SNDMORE, return -1 and
set errno to EINVAL.
2015-12-29 17:00:06 +01:00