Commit e4b3bd86 authored by Luca Boccassi's avatar Luca Boccassi

Problem: cannot set ZAP_ENFORCE_DOMAIN in testutil's wrappers

Solution: override unused parameter for NULL wrapper
parent 7722381f
...@@ -47,11 +47,17 @@ void socket_config_null_client (void *server, void *server_secret) ...@@ -47,11 +47,17 @@ void socket_config_null_client (void *server, void *server_secret)
void socket_config_null_server (void *server, void *server_secret) void socket_config_null_server (void *server, void *server_secret)
{ {
LIBZMQ_UNUSED (server_secret);
int rc = zmq_setsockopt (server, ZMQ_ZAP_DOMAIN, test_zap_domain, int rc = zmq_setsockopt (server, ZMQ_ZAP_DOMAIN, test_zap_domain,
strlen (test_zap_domain)); strlen (test_zap_domain));
assert (rc == 0); assert (rc == 0);
#ifdef ZMQ_ZAP_ENFORCE_DOMAIN
int required = server_secret ? *(int *) server_secret : 0;
rc =
zmq_setsockopt (server, ZMQ_ZAP_ENFORCE_DOMAIN, &required, sizeof (int));
assert (rc == 0);
#else
LIBZMQ_UNUSED (server_secret);
#endif
} }
// PLAIN specific functions // PLAIN specific functions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment