diff --git a/src/mechanism.cpp b/src/mechanism.cpp index 42d2b67b..6c6f265b 100644 --- a/src/mechanism.cpp +++ b/src/mechanism.cpp @@ -63,7 +63,7 @@ void zmq::mechanism_t::peer_routing_id (msg_t *msg_) void zmq::mechanism_t::set_user_id (const void *data_, size_t size_) { _user_id.set (static_cast (data_), size_); - zap_properties.ZMQ_MAP_INSERT_OR_EMPLACE ( + _zap_properties.ZMQ_MAP_INSERT_OR_EMPLACE ( std::string (ZMQ_MSG_PROPERTY_USER_ID), std::string (reinterpret_cast (data_), size_)); } @@ -268,7 +268,7 @@ int zmq::mechanism_t::parse_metadata (const unsigned char *ptr_, if (rc == -1) return -1; } - (zap_flag_ ? zap_properties : zmtp_properties) + (zap_flag_ ? _zap_properties : _zmtp_properties) .ZMQ_MAP_INSERT_OR_EMPLACE ( name, std::string (reinterpret_cast (value), value_length)); diff --git a/src/mechanism.hpp b/src/mechanism.hpp index b96a9d8e..edd58a8f 100644 --- a/src/mechanism.hpp +++ b/src/mechanism.hpp @@ -81,9 +81,12 @@ class mechanism_t const blob_t &get_user_id () const; - const metadata_t::dict_t &get_zmtp_properties () { return zmtp_properties; } + const metadata_t::dict_t &get_zmtp_properties () + { + return _zmtp_properties; + } - const metadata_t::dict_t &get_zap_properties () { return zap_properties; } + const metadata_t::dict_t &get_zap_properties () { return _zap_properties; } protected: // Only used to identify the socket for the Socket-Type @@ -123,15 +126,15 @@ class mechanism_t virtual int property (const std::string &name_, const void *value_, size_t length_); - // Properties received from ZMTP peer. - metadata_t::dict_t zmtp_properties; - - // Properties received from ZAP server. - metadata_t::dict_t zap_properties; - const options_t options; private: + // Properties received from ZMTP peer. + metadata_t::dict_t _zmtp_properties; + + // Properties received from ZAP server. + metadata_t::dict_t _zap_properties; + blob_t _routing_id; blob_t _user_id;