Under some circumstances (which probably no longer apply in master) gcc inlined get_monitor_event into test_null_creds and then emitted a "maybe uninitialized" warning on the use of error. This would only be a problem if the tested code was misbehaving but I guess that's the point of a test!
Problem: the new reimplementation of zmq_proxy_steerable had PAUSE/RESUME
that didn't follow expected behaviour. Possibly mixed up. Test didn't properly
cover the issue.
Solution: improve test coverage, fix the proxy command parsing.
I had no knowledge of the pre-MPL-2.0 implementation. This fix is based
on documented semantics and prior API usage. I contribute this
under MPL-2.0.
It is contriubted under the MPL-2.0.
I had no knowledge of the previous implementation of zmq_proxy_steerable().
This version was developed based on expectations set in the old man page with one exception. This version uses a REP/REQ for the proxy control protocol sockets. The old man page example used PUB/SUB which is nonsensical given the STATISTICS command requires two way communication.
* Problem: long flag isn't set for subscriptions if topic has between 246 and 255 characters
Solution: fix V3.1 encoder to calculate long flag after evaluating the subscribe and cancel commands
Solution: remove implementation. Frank Hartmann <soundart@gmx.net>,
the author, rejected our request to relicense under MPL2, so we
have to remove his copyrighted work.
Tweetnacl is not security-supported and could not be used in
production environments anyway, the supported backend is libsodium.
Solution: remove implementation. Laurent Alebarde <l.alebarde@free.fr>,
the author, did not respond to requests to allow relicensing to MPL2,
so we have to remove his copyrighted work.
Make the API into an empty stub that returns -EOPNOTSUPP.
zmq_ppoll mostly mimics zmq_poll behavior, except for the added feature of being able to specify a signal mask. Signals in this mask will be blocked during execution of zmq_ppoll. Switching of the process' active signal mask happens atomically with the actual poll call, so that no race conditions can occur. This behavior is useful when one wants to gracefully handle POSIX signals without race conditions. See e.g. the discussion below https://250bpm.com/blog:12/ for an explanation.
Also includes two new tests:
1. test_zmq_ppoll_fd does the same thing as test_zmq_poll_fd, demonstrating backwards compatibility with zmq_poll when used with a default signal mask.
2. test_zmq_ppoll_signals demonstrates the use of zmq_ppoll with a signal mask, blocking out SIGTERM everywhere except in zmq_ppoll, allowing to handle the signal in one place without having to worry about race conditions.
This is important in order to send the login sequence of a client to the server.
Solution: add ZMQ_HICCUP_MSG to a socket, socket would send that message whenever a connection get temporarly disconnected
There is a macro that redefines claose to closesocket, but then close is
later defined in unistd.h which is included in testutil_unity.cpp which
then causes the regular close() prototype to be defined with the new
function name closesocket which does not match the signature of the
original closesocket in winsock2.h from the toolchain.
We can work around this issue, by making sure that unistd.h is included
before the macro is defined. HMM> Yes macro substitution is the root of
evil.
* Problem: No direct support for setting socket priority
Solution: Add ZMQ_PRIORITY socket option, which sets the
SO_PRIORITY socket option on the underlying socket. This
socket option is not supported under Windows. Check option
and set socket option on creation of underlying socket.
Solution: encode subscribe/cancel messages until there are appropriate
opcodes.
Regression introduced by 253e9dd27b3d7c0d736d4fa3802e87d00bd915c9
Fixes https://github.com/zeromq/libzmq/issues/4101
Solution: remove arbitrary timeouts, as they are testing reliable pipes
with no contention, so if it can connect eventually it has to
work. The overall test timeout covers cases where it doesn't.
If tests want to use receive timeouts, they need to handle EAGAIN
properly.