diff options
author | Martin Sustrik <sustrik@fastmq.com> | 2009-09-09 09:07:11 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@fastmq.com> | 2009-09-09 09:07:11 +0200 |
commit | c99f39abc669084fd3a94675ee98e235448ad5a4 (patch) | |
tree | 26480a694e81daceb6f3f97ec94147011c389e6d /src | |
parent | 37d8371967308ab1e541cf58b91e368b3e0b526c (diff) | |
parent | cb78991f8e20fa35d99fa209be659c0aed59de47 (diff) |
Merge branch 'master' of git@github.com:sustrik/zeromq2
Diffstat (limited to 'src')
-rw-r--r-- | src/devpoll.cpp | 6 | ||||
-rw-r--r-- | src/object.hpp | 2 | ||||
-rw-r--r-- | src/tcp_socket.cpp | 3 | ||||
-rw-r--r-- | src/zmq.cpp | 3 |
4 files changed, 9 insertions, 5 deletions
diff --git a/src/devpoll.cpp b/src/devpoll.cpp index b7d153c..ac5c72f 100644 --- a/src/devpoll.cpp +++ b/src/devpoll.cpp @@ -30,10 +30,12 @@ #include <fcntl.h> #include <unistd.h> #include <limits.h> +#include <algorithm> #include "devpoll.hpp" #include "err.hpp" #include "config.hpp" +#include "i_poll_events.hpp" zmq::devpoll_t::devpoll_t () { @@ -156,11 +158,11 @@ void zmq::devpoll_t::stop () stopping = true; } -bool zmq::devpoll_t::loop () +void zmq::devpoll_t::loop () { // According to the poll(7d) man page, we can retrieve // no more then (OPEN_MAX - 1) events. - int nfds = std::min (max_io_events, OPEN_MAX - 1); + int nfds = std::min ((int) max_io_events, OPEN_MAX - 1); while (!stopping) { diff --git a/src/object.hpp b/src/object.hpp index 2e41507..1954071 100644 --- a/src/object.hpp +++ b/src/object.hpp @@ -37,7 +37,7 @@ namespace zmq object_t (class dispatcher_t *dispatcher_, int thread_slot_); object_t (object_t *parent_); - ~object_t (); + virtual ~object_t (); int get_thread_slot (); dispatcher_t *get_dispatcher (); diff --git a/src/tcp_socket.cpp b/src/tcp_socket.cpp index 782f0d8..7e68e7d 100644 --- a/src/tcp_socket.cpp +++ b/src/tcp_socket.cpp @@ -184,4 +184,5 @@ int zmq::tcp_socket_t::read (void *data, int size) return (size_t) nbytes; } -#endif
\ No newline at end of file +#endif + diff --git a/src/zmq.cpp b/src/zmq.cpp index 63a7b4b..c966448 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -292,4 +292,5 @@ unsigned long zmq_stopwatch_stop (void *watch_) uint64_t start = *(uint64_t*) watch_; free (watch_); return (unsigned long) (end - start); -}
\ No newline at end of file +} + |