Commit b0647431 authored by Pieter Hintjens's avatar Pieter Hintjens

ZAP vs. ZMTP metadata priority fixed

parent c01365d4
......@@ -742,14 +742,6 @@ void zmq::stream_engine_t::mechanism_ready ()
properties_t properties;
properties_t::const_iterator it;
// Add ZMTP properties.
const properties_t& zmtp_properties = mechanism->get_zmtp_properties ();
it = zmtp_properties.begin ();
while (it != zmtp_properties.end ()) {
properties.insert (properties_t::value_type (it->first, it->second));
it++;
}
// Add ZAP properties.
const properties_t& zap_properties = mechanism->get_zap_properties ();
it = zap_properties.begin ();
......@@ -758,6 +750,14 @@ void zmq::stream_engine_t::mechanism_ready ()
it++;
}
// Add ZMTP properties.
const properties_t& zmtp_properties = mechanism->get_zmtp_properties ();
it = zmtp_properties.begin ();
while (it != zmtp_properties.end ()) {
properties.insert (properties_t::value_type (it->first, it->second));
it++;
}
zmq_assert (metadata == NULL);
if (!properties.empty ())
metadata = new (std::nothrow) metadata_t (properties);
......
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