mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-01 10:57:59 +01:00
Problem: some conditional compile was not applied
Conditinoal compile for OPENPGM and NORM is mixed. Also found few codes which needs conditional compile but not applied. Solution: Apply conditional compile preprocessors
This commit is contained in:
parent
ebd22ecf85
commit
4f436ce00f
@ -62,9 +62,13 @@ namespace protocol_name
|
||||
static const char inproc[] = "inproc";
|
||||
static const char tcp[] = "tcp";
|
||||
static const char udp[] = "udp";
|
||||
#ifdef ZMQ_HAVE_OPENPGM
|
||||
static const char pgm[] = "pgm";
|
||||
static const char epgm[] = "epgm";
|
||||
#endif
|
||||
#ifdef ZMQ_HAVE_NORM
|
||||
static const char norm[] = "norm";
|
||||
#endif
|
||||
#ifdef ZMQ_HAVE_WS
|
||||
static const char ws[] = "ws";
|
||||
#endif
|
||||
|
@ -534,10 +534,14 @@ void zmq::session_base_t::reconnect ()
|
||||
{
|
||||
// For delayed connect situations, terminate the pipe
|
||||
// and reestablish later on
|
||||
if (_pipe && options.immediate == 1
|
||||
if (_pipe && options.immediate == 1
|
||||
#ifdef ZMQ_HAVE_OPENPGM
|
||||
&& _addr->protocol != protocol_name::pgm
|
||||
&& _addr->protocol != protocol_name::epgm
|
||||
#endif
|
||||
#ifdef ZMQ_HAVE_NORM
|
||||
&& _addr->protocol != protocol_name::norm
|
||||
#endif
|
||||
&& _addr->protocol != protocol_name::udp) {
|
||||
_pipe->hiccup ();
|
||||
_pipe->terminate (false);
|
||||
|
@ -369,8 +369,14 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_) const
|
||||
// Specifically, multicast protocols can't be combined with
|
||||
// bi-directional messaging patterns (socket types).
|
||||
#if defined ZMQ_HAVE_OPENPGM || defined ZMQ_HAVE_NORM
|
||||
if ((protocol_ == protocol_name::pgm || protocol_ == protocol_name::epgm
|
||||
|| protocol_ == protocol_name::norm)
|
||||
if ((false
|
||||
#ifdef ZMQ_HAVE_OPENPGM
|
||||
|| protocol_ == protocol_name::pgm || protocol_ == protocol_name::epgm
|
||||
#endif
|
||||
#ifdef ZMQ_HAVE_NORM
|
||||
|| protocol_ == protocol_name::norm
|
||||
#endif
|
||||
|| false)
|
||||
&& options.type != ZMQ_PUB && options.type != ZMQ_SUB
|
||||
&& options.type != ZMQ_XPUB && options.type != ZMQ_XSUB) {
|
||||
errno = ENOCOMPATPROTO;
|
||||
@ -547,8 +553,14 @@ int zmq::socket_base_t::bind (const char *endpoint_uri_)
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (protocol == protocol_name::pgm || protocol == protocol_name::epgm
|
||||
|| protocol == protocol_name::norm) {
|
||||
if (false
|
||||
#ifdef ZMQ_HAVE_OPENPGM
|
||||
|| protocol == protocol_name::pgm || protocol == protocol_name::epgm
|
||||
#endif
|
||||
#ifdef ZMQ_HAVE_NORM
|
||||
|| protocol == protocol_name::norm
|
||||
#endif
|
||||
|| false) {
|
||||
// For convenience's sake, bind can be used interchangeable with
|
||||
// connect for PGM, EPGM, NORM transports.
|
||||
rc = connect (endpoint_uri_);
|
||||
@ -1023,9 +1035,14 @@ int zmq::socket_base_t::connect_internal (const char *endpoint_uri_)
|
||||
|
||||
// PGM does not support subscription forwarding; ask for all data to be
|
||||
// sent to this pipe. (same for NORM, currently?)
|
||||
const bool subscribe_to_all = protocol == protocol_name::pgm
|
||||
const bool subscribe_to_all = false
|
||||
#ifdef ZMQ_HAVE_OPENPGM
|
||||
|| protocol == protocol_name::pgm
|
||||
|| protocol == protocol_name::epgm
|
||||
#endif
|
||||
#ifdef ZMQ_HAVE_NORM
|
||||
|| protocol == protocol_name::norm
|
||||
#endif
|
||||
|| protocol == protocol_name::udp;
|
||||
pipe_t *newpipe = NULL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user