mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-28 19:52:00 +01:00
gssapi: move new options to DRAFT section
Problem: The new GSSAPI NAMESPACE options should have been added to the DRAFT section of the API so they can be changed until stabilized. Solution: - Move defines to the DRAFT section of zmq.h - Duplicate them in zmq_draft.h, as is the local custom - Compile only if defined (ZMQ_BUILD_DRAFT_API) - Refactor internals slightly to avoid #ifdef hell
This commit is contained in:
@@ -69,8 +69,10 @@ zmq::options_t::options_t () :
|
||||
tcp_keepalive_intvl (-1),
|
||||
mechanism (ZMQ_NULL),
|
||||
as_server (0),
|
||||
#ifdef ZMQ_BUILD_DRAFT_API
|
||||
gss_principal_nt (ZMQ_GSSAPI_NT_HOSTBASED),
|
||||
gss_service_principal_nt (ZMQ_GSSAPI_NT_HOSTBASED),
|
||||
#endif
|
||||
gss_plaintext (false),
|
||||
socket_id (0),
|
||||
conflate (false),
|
||||
@@ -511,6 +513,7 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
#ifdef ZMQ_BUILD_DRAFT_API
|
||||
case ZMQ_GSSAPI_PRINCIPAL_NAMETYPE:
|
||||
if (is_int && (value == ZMQ_GSSAPI_NT_HOSTBASED
|
||||
|| value == ZMQ_GSSAPI_NT_USER_NAME
|
||||
@@ -527,6 +530,7 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
case ZMQ_HANDSHAKE_IVL:
|
||||
|
||||
Reference in New Issue
Block a user