diff --git a/src/ipc_connecter.cpp b/src/ipc_connecter.cpp index 46900df5..ef60b0c7 100644 --- a/src/ipc_connecter.cpp +++ b/src/ipc_connecter.cpp @@ -74,7 +74,7 @@ void zmq::ipc_connecter_t::out_event () return; } - create_engine (fd); + create_engine (fd, get_socket_name (fd, socket_end_local)); } void zmq::ipc_connecter_t::start_connecting () diff --git a/src/stream_connecter_base.cpp b/src/stream_connecter_base.cpp index 8e4d3cf8..23de90fe 100644 --- a/src/stream_connecter_base.cpp +++ b/src/stream_connecter_base.cpp @@ -145,10 +145,11 @@ void zmq::stream_connecter_base_t::in_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", - _endpoint, endpoint_type_connect); + const endpoint_uri_pair_t endpoint_pair (local_address_, _endpoint, + endpoint_type_connect); // Create the engine object for this connection. stream_engine_t *engine = diff --git a/src/stream_connecter_base.hpp b/src/stream_connecter_base.hpp index d8a789be..3e28de2f 100644 --- a/src/stream_connecter_base.hpp +++ b/src/stream_connecter_base.hpp @@ -63,7 +63,7 @@ class stream_connecter_base_t : public own_t, public io_object_t void timer_event (int id_); // 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 void add_reconnect_timer (); diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp index 67069a99..5cbbf436 100644 --- a/src/tcp_connecter.cpp +++ b/src/tcp_connecter.cpp @@ -111,7 +111,7 @@ void zmq::tcp_connecter_t::out_event () return; } - create_engine (fd); + create_engine (fd, get_socket_name (fd, socket_end_local)); } void zmq::tcp_connecter_t::timer_event (int id_) diff --git a/src/tipc_connecter.cpp b/src/tipc_connecter.cpp index 418f7a80..6725ea3e 100644 --- a/src/tipc_connecter.cpp +++ b/src/tipc_connecter.cpp @@ -76,7 +76,7 @@ void zmq::tipc_connecter_t::out_event () return; } - create_engine (fd); + create_engine (fd, get_socket_name (fd, socket_end_local)); } void zmq::tipc_connecter_t::start_connecting ()