Copy monitor specific event endpoints to event messages as the engine etc. can be released at anytime

This commit is contained in:
Lourens Naudé
2012-11-17 11:29:47 +00:00
parent ce4d321684
commit 6d245eb6bc
7 changed files with 71 additions and 51 deletions

View File

@@ -85,7 +85,7 @@ void zmq::tcp_listener_t::in_event ()
// If connection was reset by the peer in the meantime, just ignore it.
// TODO: Handle specific errors like ENFILE/EMFILE etc.
if (fd == retired_fd) {
socket->event_accept_failed (endpoint.c_str(), zmq_errno());
socket->event_accept_failed (endpoint, zmq_errno());
return;
}
@@ -108,7 +108,7 @@ void zmq::tcp_listener_t::in_event ()
session->inc_seqnum ();
launch_child (session);
send_attach (session, engine, false);
socket->event_accepted (endpoint.c_str(), fd);
socket->event_accepted (endpoint, fd);
}
void zmq::tcp_listener_t::close ()
@@ -121,7 +121,7 @@ void zmq::tcp_listener_t::close ()
int rc = ::close (s);
errno_assert (rc == 0);
#endif
socket->event_closed (endpoint.c_str(), s);
socket->event_closed (endpoint, s);
s = retired_fd;
}
@@ -223,7 +223,7 @@ int zmq::tcp_listener_t::set_address (const char *addr_)
goto error;
#endif
socket->event_listening (endpoint.c_str(), s);
socket->event_listening (endpoint, s);
return 0;
error: