Permalink
Browse files

Fix addresses on triggered events

  • Loading branch information...
1 parent 37f8ce6 commit 5205415beb7631200a0dc150d1e6acf8089b65ff @methodmissing methodmissing committed Nov 14, 2012
Showing with 9 additions and 9 deletions.
  1. +9 −9 src/socket_base.cpp
View
@@ -1063,7 +1063,7 @@ void zmq::socket_base_t::event_connect_delayed (const char *addr_, int err_)
if (monitor_events & ZMQ_EVENT_CONNECT_DELAYED) {
zmq_event_t event;
event.event = ZMQ_EVENT_CONNECT_DELAYED;
- event.data.connected.addr = const_cast <char *> (addr_);
+ event.data.connect_delayed.addr = const_cast <char *> (addr_);
event.data.connect_delayed.err = err_;
monitor_event (event);
}
@@ -1074,7 +1074,7 @@ void zmq::socket_base_t::event_connect_retried (const char *addr_, int interval_
if (monitor_events & ZMQ_EVENT_CONNECT_RETRIED) {
zmq_event_t event;
event.event = ZMQ_EVENT_CONNECT_RETRIED;
- event.data.connected.addr = const_cast <char *> (addr_);
+ event.data.connect_retried.addr = const_cast <char *> (addr_);
event.data.connect_retried.interval = interval_;
monitor_event (event);
}
@@ -1085,7 +1085,7 @@ void zmq::socket_base_t::event_listening (const char *addr_, int fd_)
if (monitor_events & ZMQ_EVENT_LISTENING) {
zmq_event_t event;
event.event = ZMQ_EVENT_LISTENING;
- event.data.connected.addr = const_cast <char *> (addr_);
+ event.data.listening.addr = const_cast <char *> (addr_);
event.data.listening.fd = fd_;
monitor_event (event);
}
@@ -1096,7 +1096,7 @@ void zmq::socket_base_t::event_bind_failed (const char *addr_, int err_)
if (monitor_events & ZMQ_EVENT_BIND_FAILED) {
zmq_event_t event;
event.event = ZMQ_EVENT_BIND_FAILED;
- event.data.connected.addr = const_cast <char *> (addr_);
+ event.data.bind_failed.addr = const_cast <char *> (addr_);
event.data.bind_failed.err = err_;
monitor_event (event);
}
@@ -1107,7 +1107,7 @@ void zmq::socket_base_t::event_accepted (const char *addr_, int fd_)
if (monitor_events & ZMQ_EVENT_ACCEPTED) {
zmq_event_t event;
event.event = ZMQ_EVENT_ACCEPTED;
- event.data.connected.addr = const_cast <char *> (addr_);
+ event.data.accepted.addr = const_cast <char *> (addr_);
event.data.accepted.fd = fd_;
monitor_event (event);
}
@@ -1118,7 +1118,7 @@ void zmq::socket_base_t::event_accept_failed (const char *addr_, int err_)
if (monitor_events & ZMQ_EVENT_ACCEPT_FAILED) {
zmq_event_t event;
event.event = ZMQ_EVENT_ACCEPT_FAILED;
- event.data.connected.addr = const_cast <char *> (addr_);
+ event.data.accept_failed.addr = const_cast <char *> (addr_);
event.data.accept_failed.err= err_;
monitor_event (event);
}
@@ -1129,7 +1129,7 @@ void zmq::socket_base_t::event_closed (const char *addr_, int fd_)
if (monitor_events & ZMQ_EVENT_CLOSED) {
zmq_event_t event;
event.event = ZMQ_EVENT_CLOSED;
- event.data.connected.addr = const_cast <char *> (addr_);
+ event.data.closed.addr = const_cast <char *> (addr_);
event.data.closed.fd = fd_;
monitor_event (event);
}
@@ -1140,7 +1140,7 @@ void zmq::socket_base_t::event_close_failed (const char *addr_, int err_)
if (monitor_events & ZMQ_EVENT_CLOSE_FAILED) {
zmq_event_t event;
event.event = ZMQ_EVENT_CLOSE_FAILED;
- event.data.connected.addr = const_cast <char *> (addr_);
+ event.data.close_failed.addr = const_cast <char *> (addr_);
event.data.close_failed.err = err_;
monitor_event (event);
}
@@ -1151,7 +1151,7 @@ void zmq::socket_base_t::event_disconnected (const char *addr_, int fd_)
if (monitor_events & ZMQ_EVENT_DISCONNECTED) {
zmq_event_t event;
event.event = ZMQ_EVENT_DISCONNECTED;
- event.data.connected.addr = const_cast <char *> (addr_);
+ event.data.disconnected.addr = const_cast <char *> (addr_);
event.data.disconnected.fd = fd_;
monitor_event (event);
}

0 comments on commit 5205415

Please sign in to comment.