Commit dd2be381 authored by Martin Hurton's avatar Martin Hurton

Add const qualifier to register_endpoint param

parent 99dba23d
...@@ -349,7 +349,8 @@ zmq::io_thread_t *zmq::ctx_t::choose_io_thread (uint64_t affinity_) ...@@ -349,7 +349,8 @@ zmq::io_thread_t *zmq::ctx_t::choose_io_thread (uint64_t affinity_)
return selected_io_thread; return selected_io_thread;
} }
int zmq::ctx_t::register_endpoint (const char *addr_, endpoint_t &endpoint_) int zmq::ctx_t::register_endpoint (const char *addr_,
const endpoint_t &endpoint_)
{ {
endpoints_sync.lock (); endpoints_sync.lock ();
......
...@@ -99,7 +99,7 @@ namespace zmq ...@@ -99,7 +99,7 @@ namespace zmq
zmq::object_t *get_reaper (); zmq::object_t *get_reaper ();
// Management of inproc endpoints. // Management of inproc endpoints.
int register_endpoint (const char *addr_, endpoint_t &endpoint_); int register_endpoint (const char *addr_, const endpoint_t &endpoint_);
void unregister_endpoints (zmq::socket_base_t *socket_); void unregister_endpoints (zmq::socket_base_t *socket_);
endpoint_t find_endpoint (const char *addr_); endpoint_t find_endpoint (const char *addr_);
void pend_connection (const std::string &addr_, void pend_connection (const std::string &addr_,
......
...@@ -137,7 +137,8 @@ void zmq::object_t::process_command (command_t &cmd_) ...@@ -137,7 +137,8 @@ void zmq::object_t::process_command (command_t &cmd_)
} }
} }
int zmq::object_t::register_endpoint (const char *addr_, endpoint_t &endpoint_) int zmq::object_t::register_endpoint (const char *addr_,
const endpoint_t &endpoint_)
{ {
return ctx->register_endpoint (addr_, endpoint_); return ctx->register_endpoint (addr_, endpoint_);
} }
......
...@@ -59,7 +59,8 @@ namespace zmq ...@@ -59,7 +59,8 @@ namespace zmq
// Using following function, socket is able to access global // Using following function, socket is able to access global
// repository of inproc endpoints. // repository of inproc endpoints.
int register_endpoint (const char *addr_, zmq::endpoint_t &endpoint_); int register_endpoint (const char *addr_,
const zmq::endpoint_t &endpoint_);
void unregister_endpoints (zmq::socket_base_t *socket_); void unregister_endpoints (zmq::socket_base_t *socket_);
zmq::endpoint_t find_endpoint (const char *addr_); zmq::endpoint_t find_endpoint (const char *addr_);
void pend_connection (const std::string &addr_, void pend_connection (const std::string &addr_,
......
...@@ -365,7 +365,7 @@ int zmq::socket_base_t::bind (const char *addr_) ...@@ -365,7 +365,7 @@ int zmq::socket_base_t::bind (const char *addr_)
return -1; return -1;
if (protocol == "inproc") { if (protocol == "inproc") {
endpoint_t endpoint = {this, options}; const endpoint_t endpoint = { this, options };
int rc = register_endpoint (addr_, endpoint); int rc = register_endpoint (addr_, endpoint);
if (rc == 0) { if (rc == 0) {
connect_pending(addr_, this); connect_pending(addr_, this);
......
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