mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-13 14:45:38 +02:00
Problem: literals protocol names still remains
Solution: replace into named constants
This commit is contained in:
@@ -534,8 +534,10 @@ void zmq::session_base_t::reconnect ()
|
||||
{
|
||||
// For delayed connect situations, terminate the pipe
|
||||
// and reestablish later on
|
||||
if (_pipe && options.immediate == 1 && _addr->protocol != "pgm"
|
||||
&& _addr->protocol != "epgm" && _addr->protocol != "norm"
|
||||
if (_pipe && options.immediate == 1
|
||||
&& _addr->protocol != protocol_name::pgm
|
||||
&& _addr->protocol != protocol_name::epgm
|
||||
&& _addr->protocol != protocol_name::norm
|
||||
&& _addr->protocol != protocol_name::udp) {
|
||||
_pipe->hiccup ();
|
||||
_pipe->terminate (false);
|
||||
@@ -604,13 +606,13 @@ zmq::session_base_t::start_connecting_entry_t
|
||||
start_connecting_entry_t (protocol_name::udp,
|
||||
&zmq::session_base_t::start_connecting_udp),
|
||||
#if defined ZMQ_HAVE_OPENPGM
|
||||
start_connecting_entry_t ("pgm",
|
||||
start_connecting_entry_t (protocol_name::pgm,
|
||||
&zmq::session_base_t::start_connecting_pgm),
|
||||
start_connecting_entry_t ("epgm",
|
||||
start_connecting_entry_t (protocol_name::epgm,
|
||||
&zmq::session_base_t::start_connecting_pgm),
|
||||
#endif
|
||||
#if defined ZMQ_HAVE_NORM
|
||||
start_connecting_entry_t ("norm",
|
||||
start_connecting_entry_t (protocol_name::norm,
|
||||
&zmq::session_base_t::start_connecting_norm),
|
||||
#endif
|
||||
};
|
||||
@@ -724,7 +726,7 @@ void zmq::session_base_t::start_connecting_pgm (io_thread_t *io_thread_)
|
||||
|| options.type == ZMQ_SUB || options.type == ZMQ_XSUB);
|
||||
|
||||
// For EPGM transport with UDP encapsulation of PGM is used.
|
||||
bool const udp_encapsulation = _addr->protocol == "epgm";
|
||||
bool const udp_encapsulation = _addr->protocol == protocol_name::epgm;
|
||||
|
||||
// At this point we'll create message pipes to the session straight
|
||||
// away. There's no point in delaying it as no concept of 'connect'
|
||||
|
Reference in New Issue
Block a user