summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormalosek <malosek@fastmq.com>2009-11-03 19:54:43 +0100
committermalosek <malosek@fastmq.com>2009-11-03 19:54:43 +0100
commitc2cd7977f7a82e978d77b2d4d8e23d78f71e809c (patch)
treed0994195cf99efca96a068235f000d9c5d668fbc
parent08b02a43ae21e833a04d274fb20ef3bbc73c0d09 (diff)
update pgm_socket to recent openpgm2
-rw-r--r--src/pgm_socket.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp
index 89efe6b..ed764c7 100644
--- a/src/pgm_socket.cpp
+++ b/src/pgm_socket.cpp
@@ -515,8 +515,8 @@ int zmq::pgm_socket_t::get_receiver_fds (int *receive_fd_,
zmq_assert (!g_transport->can_send_data);
// Take FDs directly from transport.
- *receive_fd_ = g_transport->recv_sock;
- *waiting_pipe_fd_ = pgm_notify_get_fd (&g_transport->pending_notify);
+ *receive_fd_ = pgm_transport_get_recv_fd (g_transport);
+ *waiting_pipe_fd_ = pgm_transport_get_pending_fd (g_transport);
#endif
return pgm_receiver_fd_count;
@@ -567,9 +567,9 @@ int zmq::pgm_socket_t::get_sender_fds (int *send_fd_, int *receive_fd_,
zmq_assert (!g_transport->can_recv_data);
// Take FDs directly from transport.
- *receive_fd_ = g_transport->recv_sock;
- *rdata_notify_fd_ = pgm_notify_get_fd (&g_transport->rdata_notify);
- *send_fd_ = g_transport->send_sock;
+ *receive_fd_ = pgm_transport_get_recv_fd (g_transport);
+ *rdata_notify_fd_ = pgm_transport_get_repair_fd (g_transport);
+ *send_fd_ = pgm_transport_get_send_fd (g_transport);
#endif
return pgm_sender_fd_count;
@@ -761,9 +761,8 @@ ssize_t zmq::pgm_socket_t::receive (void **raw_data_, const pgm_tsi_t **tsi_)
// In a case when no ODATA/RDATA fired POLLIN event (SPM...)
// pgm_recvmsg returns ?.
-/* if (status == PGM_IO_STATUS_AGAIN ||
- status == PGM_IO_STATUS_AGAIN2) {
-
+ if (status == PGM_IO_STATUS_TIMER_PENDING) {
+
zmq_assert (nbytes_rec == 0);
// In case if no RDATA/ODATA caused POLLIN 0 is
@@ -771,7 +770,7 @@ ssize_t zmq::pgm_socket_t::receive (void **raw_data_, const pgm_tsi_t **tsi_)
nbytes_rec = 0;
return 0;
}
-*/
+
// Data loss.
if (status == PGM_IO_STATUS_RESET) {
@@ -873,7 +872,7 @@ void zmq::pgm_socket_t::process_upstream (void)
(int) status, (int) dummy_bytes, __FILE__, __LINE__);
// No data should be returned.
- zmq_assert (dummy_bytes == 0 && status == PGM_IO_STATUS_WOULD_BLOCK);
+ zmq_assert (dummy_bytes == 0 && status == PGM_IO_STATUS_TIMER_PENDING);
#endif
}