summaryrefslogtreecommitdiff
path: root/src/poll.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-06-09 17:49:08 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-06-09 17:49:08 +0200
commit604f7475ec1d19df416156879db3ddd3c90d5a13 (patch)
treee7619cda4679c31acb9c6160dc9f3dc7f8a94e5e /src/poll.cpp
parent7a29e8594fb539e37b9d08982b1f491b0794b7d2 (diff)
issue 32 - poll_t poller broken
Diffstat (limited to 'src/poll.cpp')
-rw-r--r--src/poll.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/poll.cpp b/src/poll.cpp
index 4214195..1b203db 100644
--- a/src/poll.cpp
+++ b/src/poll.cpp
@@ -165,22 +165,21 @@ void zmq::poll_t::loop ()
continue;
}
- for (pollset_t::iterator it = pollset.begin ();
- it != pollset.end (); it ++) {
+ for (pollset_t::size_type i = 0; i != pollset.size (); i++) {
- zmq_assert (!(it->revents & POLLNVAL));
- if (it->fd == retired_fd)
+ zmq_assert (!(pollset [i].revents & POLLNVAL));
+ if (pollset [i].fd == retired_fd)
continue;
- if (it->revents & (POLLERR | POLLHUP))
- fd_table [it->fd].events->in_event ();
- if (it->fd == retired_fd)
+ if (pollset [i].revents & (POLLERR | POLLHUP))
+ fd_table [pollset [i].fd].events->in_event ();
+ if (pollset [i].fd == retired_fd)
continue;
- if (it->revents & POLLOUT)
- fd_table [it->fd].events->out_event ();
- if (it->fd == retired_fd)
+ if (pollset [i].revents & POLLOUT)
+ fd_table [pollset [i].fd].events->out_event ();
+ if (pollset [i].fd == retired_fd)
continue;
- if (it->revents & POLLIN)
- fd_table [it->fd].events->in_event ();
+ if (pollset [i].revents & POLLIN)
+ fd_table [pollset [i].fd].events->in_event ();
}
// Clean up the pollset and update the fd_table accordingly.