Commit 87082557 authored by Simon Giesecke's avatar Simon Giesecke Committed by Simon Giesecke

Problem: stream_connecter_base_t does not set local address

Solution: pass the local address by subclasses to create_engine
parent aec9b130
...@@ -74,7 +74,7 @@ void zmq::ipc_connecter_t::out_event () ...@@ -74,7 +74,7 @@ void zmq::ipc_connecter_t::out_event ()
return; return;
} }
create_engine (fd); create_engine (fd, get_socket_name<ipc_address_t> (fd, socket_end_local));
} }
void zmq::ipc_connecter_t::start_connecting () void zmq::ipc_connecter_t::start_connecting ()
......
...@@ -145,10 +145,11 @@ void zmq::stream_connecter_base_t::in_event () ...@@ -145,10 +145,11 @@ void zmq::stream_connecter_base_t::in_event ()
out_event (); out_event ();
} }
void zmq::stream_connecter_base_t::create_engine (fd_t fd) void zmq::stream_connecter_base_t::create_engine (
fd_t fd, const std::string &local_address_)
{ {
const endpoint_uri_pair_t endpoint_pair ("TODO query local endpoint", const endpoint_uri_pair_t endpoint_pair (local_address_, _endpoint,
_endpoint, endpoint_type_connect); endpoint_type_connect);
// Create the engine object for this connection. // Create the engine object for this connection.
stream_engine_t *engine = stream_engine_t *engine =
......
...@@ -63,7 +63,7 @@ class stream_connecter_base_t : public own_t, public io_object_t ...@@ -63,7 +63,7 @@ class stream_connecter_base_t : public own_t, public io_object_t
void timer_event (int id_); void timer_event (int id_);
// Internal function to create the engine after connection was established. // Internal function to create the engine after connection was established.
void create_engine (fd_t fd); void create_engine (fd_t fd, const std::string &local_address_);
// Internal function to add a reconnect timer // Internal function to add a reconnect timer
void add_reconnect_timer (); void add_reconnect_timer ();
......
...@@ -111,7 +111,7 @@ void zmq::tcp_connecter_t::out_event () ...@@ -111,7 +111,7 @@ void zmq::tcp_connecter_t::out_event ()
return; return;
} }
create_engine (fd); create_engine (fd, get_socket_name<tcp_address_t> (fd, socket_end_local));
} }
void zmq::tcp_connecter_t::timer_event (int id_) void zmq::tcp_connecter_t::timer_event (int id_)
......
...@@ -76,7 +76,7 @@ void zmq::tipc_connecter_t::out_event () ...@@ -76,7 +76,7 @@ void zmq::tipc_connecter_t::out_event ()
return; return;
} }
create_engine (fd); create_engine (fd, get_socket_name<tipc_address_t> (fd, socket_end_local));
} }
void zmq::tipc_connecter_t::start_connecting () void zmq::tipc_connecter_t::start_connecting ()
......
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