Simon Giesecke
082b6aa641
Problem: epoll not supported under Windows
...
Solution: Use wepoll on Windows
2018-05-23 16:25:07 +02:00
Luca Boccassi
3730833f9d
Merge pull request #3125 from sigiesec/improve-socket-inheritance
...
Improve socket inheritance handling
2018-05-23 13:50:39 +01:00
Simon Giesecke
2d9a8955f5
Problem: race condition in making socket non-inheritable
...
Solution: create sockets with WSA_FLAG_NO_HANDLE_INHERIT
2018-05-23 11:23:33 +02:00
Simon Giesecke
44da0e7e42
Problem: code duplication in making sockets non-inheritable
...
Solution: extracted make_socket_noninheritable function
2018-05-23 11:23:33 +02:00
Simon Giesecke
c432aada84
Problem: inconsistent error handling and unnecessary code duplication
...
Solution: make error handling consistent and use retired_fd to remove code duplication
2018-05-23 11:23:33 +02:00
Luca Boccassi
44b0753c5c
Merge pull request #3047 from acsearle/master
...
Allow EBADF on iOS #3046
2018-05-23 09:56:32 +01:00
Luca Boccassi
d02ba13576
Merge pull request #3122 from sigiesec/test-migrations
...
Migrated some more tests to unity and fixed some more code style issues
2018-05-22 20:37:34 +01:00
Simon Giesecke
440be28d7e
Problem: unnecessary non-const variables
...
Solution: add const
2018-05-22 18:46:40 +02:00
Simon Giesecke
d6952ded71
Problem: unused include directives and redundant forward declarations
...
Solution: removed
2018-05-22 18:46:40 +02:00
Simon Giesecke
04ec6aaf28
Problem: malloc call may fail
...
Solution: add alloc_assert
2018-05-22 18:46:40 +02:00
Simon Giesecke
d326434b37
Problem: API poller cannot be set independently from I/O thread poller, poll I/O thread poller broken on Windows
...
Solution: change platform definitions to separate API poller from I/O thread poller, disallow configuring poll I/O thread poller on Windows
2018-05-22 18:36:04 +02:00
Simon Giesecke
4e616f30dd
Problem: C-style casts used
...
Solution: replace by C++-style casts
2018-05-18 17:04:01 +02:00
Simon Giesecke
d002eb5578
Problem: analyzer does not know that zmq_abort does not return
...
Solution: add no-return attributes
2018-05-18 16:25:24 +02:00
Simon Giesecke
7b3acd47b2
Problem: malloc may fail in blob_t ctors
...
Solution: add alloc_assert calls
2018-05-18 16:25:24 +02:00
Simon Giesecke
9da0c6d62f
Problem: goto jumping backwards
...
Solution: replace by for loop
2018-05-18 14:34:43 +02:00
Simon Giesecke
62e48f837d
Problem: assignment within complex condition
...
Solution: restructured code, inverted condition
2018-05-18 14:34:43 +02:00
Simon Giesecke
fcee4ccdfd
Problem: type of retired_fd is not fd_t (but int)
...
Solution: properly declared underlying type of enum declaring retired_fd
2018-05-18 14:34:43 +02:00
Simon Giesecke
f103f62630
Problem: unreachable return statement
...
Solution: fix #if/#else structure
2018-05-18 14:34:42 +02:00
Simon Giesecke
290d215324
Problem: stream_engine assumes options_t.type is a single byte, but its type is int
...
Solution: change options_t.type to int8_t
2018-05-18 14:34:42 +02:00
Simon Giesecke
e19823d83a
Problem: redundant else
...
Solution: remove redundant else
2018-05-17 15:17:55 +02:00
Simon Giesecke
ad781319ef
Problem: ternary operator used with boolean literals\n\nSolution: Use comparison with 0 instead
2018-05-17 15:17:55 +02:00
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
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
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
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
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
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
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
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
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
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
Lionel Flandrin
a833ace204
Problem: no way to specify source interface for UDP multicast sender sockets
...
Solution: if a binding interface is provided in the sender URL we pass
it to IP[V6]_MULTICAST_IF setsockopt
2018-05-13 18:32:12 +02:00
Luca Boccassi
b78cfb2395
Problem: mismatching declarations and definitions break Solaris Studio build
...
Solution: add missing const qualifier to internal functions
2018-05-13 13:17:20 +01:00
Luca Boccassi
8b82ed50a2
Problem: Solaris Studio does not convert from char * to string
...
Solution: do it explicitly to fix build on Solaris 10/11 with the Sun
compiler
2018-05-13 13:16:37 +01:00
Simon Giesecke
3d9c119543
Problem: compilation broken on Solaris
...
Solution: remove constness on pair arguments. Fixes #3090
2018-05-13 13:15:32 +01:00
Simon Giesecke
d6433b5c24
Problem: warnings in MSVC builds around size_t/int
...
Solution: use proper types
2018-05-13 11:11:19 +02:00
Lionel Flandrin
99412c810d
Problem: ZMQ doesn't expose the MULTICAST_LOOP socket option
...
Solution: add a new ZMQ_MULTICAST_LOOP option for UDP sockets.
2018-05-10 19:24:46 +02:00