0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-31 01:43:02 +08:00

6816 Commits

Author SHA1 Message Date
Simon Giesecke
22b72bb678 Problem: deallocate calls release after de-allocation
Solution: reduce to newly extracted function clear, which does not use the freed pointer
2018-05-17 15:05:41 +02:00
Simon Giesecke
e37fc47fb6 Problem: return value is stored but never used
Solution: add code to make non-use explicit
2018-05-17 15:05:41 +02:00
Simon Giesecke
2120f6aced Problem: ypipe_t::read is called with NULL argument
Solution: call check_read instead
2018-05-17 15:05:41 +02:00
Simon Giesecke
440d428153 Problem: single-argument ctor of blob_t is not marked explicit
Solution: add explicit
2018-05-17 13:29:27 +02:00
Antony Searle
fa027970bb Allow EBADF on iOS #3046 2018-05-16 14:59:44 +10:00
Luca Boccassi
cbd52feb48
Merge pull request #3112 from devindusoft/FixCompilation_ZMQ_ATOMIC_PTR_MUTEX
Fixed compilation with ZMQ_ATOMIC_PTR_MUTEX
2018-05-15 15:10:49 +01:00
Luca Boccassi
6a9c6d427f
Merge pull request #3111 from sigiesec/win-draft-fix-and-migrate-test
Reenable DRAFT builds on Appveyor and fix test_radio_dish_udp_ipv6
2018-05-15 15:08:56 +01:00
Simon Giesecke
e78d20ff2c Problem: test_radio_dish_udp_ipv6 triggers assertion under Windows
Solution: fix handling of sockaddr in recvfrom
2018-05-15 14:53:40 +02:00
Simon Giesecke
dd1c87f9d9 Problem: type mismatch errors/warnings in Windows build
Solution: fix types
2018-05-15 14:53:40 +02:00
Simon Giesecke
10cb710ab8 Problem: appveyor builds do not build DRAFT
Solution: set ENABLE_DRAFTS=ON
2018-05-15 14:53:40 +02:00
Luca Boccassi
7953083617
Merge pull request #3109 from sigiesec/migrate-test-spec-dealer-to-unity
Problem: test_spec_dealer not using test framework
2018-05-15 13:25:18 +01:00
Simon Giesecke
b30cbfc112 Problem: test_spec_dealer not using test framework
Solution: migrate to Unity
2018-05-15 13:58:08 +02:00
korbes
63e1e745f8 Fixed compilation with ZMQ_ATOMIC_PTR_MUTEX 2018-05-14 22:08:15 -03:00
Luca Boccassi
d81a041f18
Merge pull request #3103 from sigiesec/win-warnings-as-errors
Warnings in Windows builds
2018-05-14 22:53:04 +01:00
Simon Giesecke
d437d668c0 Problem: MSVC warnings in connection with poll
Solution: handle types properly
2018-05-14 22:25:21 +02:00
Simon Giesecke
e447f058e2 Problem: C4244 warnings regarding SOCKET vs. int in test_system
Solution: Use fd_t
2018-05-14 21:09:57 +02:00
Simon Giesecke
106127b5d6 Problem: C4267 warnings in test_stream_disconnect
Solution: Use size_t instead of int
2018-05-14 21:09:57 +02:00
Simon Giesecke
5ca0d4e8a9 Problem: C4267 warnings in test_spec_router
Solution: Use unsigned char instead of size_t
2018-05-14 21:09:57 +02:00
Simon Giesecke
69a6b86310 Problem: C4267 warning test_spec_pushpull
Solution: Use unsigned char instead of size_t
2018-05-14 21:09:57 +02:00
Simon Giesecke
3cbc7cb0dc Problem: C4244 warnings regarding SOCKET vs. int in test_security_null and test_security_plain
Solution: Use fd_t
2018-05-14 21:09:56 +02:00
Simon Giesecke
3ee65906af Problem: various warnings regarding SOCKET vs. int in test_security_curve
Solution: Use fd_t
2018-05-14 21:09:56 +02:00
Simon Giesecke
28631d1cd3 Problem: C4550 warning in testutil_security
Solution: explicitly compare function pointer against NULL
2018-05-14 19:18:43 +02:00
Simon Giesecke
b0c3a42ed2 Problem: C4800 warnings in unittest_ip_resolver.cpp
Solution: make proper boolean expression
2018-05-14 19:18:42 +02:00
Simon Giesecke
c589f2b603 Problem: C4800 warning in socket_base.cpp
Solution: make proper boolean expression
2018-05-14 19:18:37 +02:00
Simon Giesecke
c52871f82c Problem: C4627 warning in proxy.cpp and signaler.cpp
Solution: move conditional include directive to precompiled.hpp
2018-05-14 18:07:13 +02:00
Simon Giesecke
a8095a1046 Problem: C4800 warning in ip_resolver.cpp
Solution: fix type specification
2018-05-14 18:07:13 +02:00
Simon Giesecke
95c770a275 Problem: C4099 warning in udp_engine.cpp
Solution: fix type specification
2018-05-14 17:17:11 +02:00
Simon Giesecke
d7e99085ef Problem: Warnings in Windows builds
Solution: enable warnings-as-errors
2018-05-14 17:17:10 +02:00
Luca Boccassi
6092431b97
Merge pull request #3100 from sigiesec/fix-poller-invalid-events
Problem: zmq_poller_[add/modify] accept invalid events arguments silently
2018-05-14 15:26:19 +01:00
Simon Giesecke
8ad43907e6
Merge pull request #3101 from bluca/heartbeat_disabled
Problem: heartbeat tests are disabled
2018-05-14 15:05:29 +02:00
Simon Giesecke
bf6bde3ae3 Problem: unnecessary ifdefs regarding handling of int vs. SOCKET at various places
Solution: use a typedef instead
2018-05-14 14:58:36 +02:00
Simon Giesecke
e8877f78a9 Problem: zmq_poller_[add/modify] accept invalid events arguments silently
Solution: check and return an error on invalid arguments. Fixes #3088
2018-05-14 14:58:36 +02:00
Luca Boccassi
eac265059d Problem: heartbeat tests are disabled
Solution: re-enable them
2018-05-14 13:41:39 +01:00
Simon Giesecke
6b9b369469 Problem: zmq_poller_* argument check code is cloned
Solution: extract common code into functions
2018-05-14 14:34:46 +02:00
Luca Boccassi
54aff77475
Merge pull request #3096 from sigiesec/add-poller-docs
Add poller docs
2018-05-14 11:10:10 +01:00
Simon Giesecke
4fea7184dc Problem: man zmq_poller_* not working
Solution: add symlinks to zmq_poller.txt
2018-05-14 11:29:24 +02:00
Simon Giesecke
f4b1cae082 Problem: no documentation for zmq_poller_*
Solution: add initial documentation
2018-05-14 11:29:24 +02:00
Simon Giesecke
213254cca5 Problem: inconsistent behaviour of zmq_poller_new in case of memory exhaustion
Solution: return NULL and set errno to ENOMEM
2018-05-14 11:29:24 +02:00
Simon Giesecke
2cd147e5ff Problem: misleading comment for calling zmq_poller_add with events == 0
Solution: change comment, and add test case for zmq_poller_modify with events == 0
2018-05-14 11:29:24 +02:00
Simon Giesecke
00d25b7873 Problem: inconsistent behaviour of zmq_poller_add and zmq_poller_add_fd in case of memory exhaustion
Solution: always return -1 with errno == ENOMEM
2018-05-14 11:29:24 +02:00
Luca Boccassi
0a037a7431
Merge pull request #3097 from sigiesec/ping-context
ZMTP 3.1 PING Context not implemented
2018-05-14 09:55:41 +01:00
Simon Giesecke
be66eacf5c Problem: test_heartbeats still using plain assertions
Solution: migrate to unity assertions
2018-05-14 10:14:32 +02:00
Luca Boccassi
b331caad06 Problem: ZMTP 3.1 PING Context not implemented
Solution: if a PING message contains a context, echo it back in the
PONG message. In order to do so, create the PONG message when PING
is received and store it in the engine.
After the PING the engine goes straight to encoding and sending, so
there can always be at most one pending PING.
Add tests for various contexts.
2018-05-14 10:14:13 +02:00
Luca Boccassi
5482b1ca45 Problem: heartbeat command parsing does not check command name size
Solution: treat the first byte of the command body as the size of the
command name, rather than as an id, to comply with ZMTP 3.1.
This was not an actual problem at runtime since both heartbeat
commands have a size of 4, which was treated like an id.
But once SUBSCRIBE/UNSUBSCRIBE get implemented it needs to be checked.
2018-05-14 09:15:39 +02:00
Luca Boccassi
ba9274c39a Problem: test_heartbeats mocked ZMQ_REP is hacky and fragile
Solution: remove it, it doesn't add much value anyway
2018-05-14 09:15:38 +02:00
Simon Giesecke
f218478237 Problem: test_heartbeats use no test framework
Solution: migrate to unity
2018-05-14 09:15:38 +02:00
Simon Giesecke
df2fe88b92
Merge pull request #3095 from bluca/sunstudio_linux
Problem: building on Linux with Sun Studio still fails
2018-05-13 21:21:50 +02:00
Luca Boccassi
09f700f72e Problem: uninitialised class variable warning
Solution: initialise it
2018-05-13 18:24:50 +01:00
Luca Boccassi
7ba074fa28 Problem: Sun Studio build errors
Solution: add compiler flags to support extensions like anonymous
structs in unions, fix casting of const, and check for suncc rather
than solaris
2018-05-13 18:24:50 +01:00
Simon Giesecke
cdb54d248b
Merge pull request #3094 from simias/mcast-if
Problem: no way to specify source interface for UDP multicast sender …
2018-05-13 18:47:59 +02:00