mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-09 15:26:04 +00:00
Revert "Merge pull request #473 from methodmissing/fix-engine-endpoint"
This reverts commit 1a18c7b0a816e10f8a8a770b2141d47f661f0302, reversing changes made to bef9a41bdb991b867981317e0e20ee174ecd6fea.
This commit is contained in:
parent
1a18c7b0a8
commit
ce4d321684
@ -63,6 +63,7 @@ zmq::stream_engine_t::stream_engine_t (fd_t fd_, const options_t &options_, cons
|
||||
greeting_bytes_read (0),
|
||||
session (NULL),
|
||||
options (options_),
|
||||
endpoint (endpoint_),
|
||||
plugged (false),
|
||||
socket (NULL)
|
||||
{
|
||||
@ -95,8 +96,6 @@ zmq::stream_engine_t::stream_engine_t (fd_t fd_, const options_t &options_, cons
|
||||
int rc = setsockopt (s, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof (int));
|
||||
errno_assert (rc == 0);
|
||||
#endif
|
||||
endpoint = new char[endpoint_.length() + 1];
|
||||
strcpy (endpoint, endpoint_.c_str());
|
||||
}
|
||||
|
||||
zmq::stream_engine_t::~stream_engine_t ()
|
||||
@ -118,7 +117,6 @@ zmq::stream_engine_t::~stream_engine_t ()
|
||||
delete encoder;
|
||||
if (decoder != NULL)
|
||||
delete decoder;
|
||||
delete [] endpoint;
|
||||
}
|
||||
|
||||
void zmq::stream_engine_t::plug (io_thread_t *io_thread_,
|
||||
@ -486,7 +484,7 @@ int zmq::stream_engine_t::push_msg (msg_t *msg_)
|
||||
void zmq::stream_engine_t::error ()
|
||||
{
|
||||
zmq_assert (session);
|
||||
socket->event_disconnected (endpoint, s);
|
||||
socket->event_disconnected (endpoint.c_str(), s);
|
||||
session->detach ();
|
||||
unplug ();
|
||||
delete this;
|
||||
|
@ -132,7 +132,7 @@ namespace zmq
|
||||
options_t options;
|
||||
|
||||
// String representation of endpoint
|
||||
char *endpoint;
|
||||
std::string endpoint;
|
||||
|
||||
bool plugged;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user