From 08454f1f40110c92405042da1bc6928052f7fed7 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Thu, 8 Jan 2009 06:20:28 +0000 Subject: Tidied up a number of TODO items git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@732620 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/AsynchIO.h | 12 +++++------- cpp/src/qpid/sys/TCPIOPlugin.cpp | 1 + cpp/src/qpid/sys/posix/AsynchIO.cpp | 5 +++-- cpp/src/qpid/sys/windows/AsynchIO.cpp | 2 ++ 4 files changed, 11 insertions(+), 9 deletions(-) (limited to 'cpp/src/qpid/sys') diff --git a/cpp/src/qpid/sys/AsynchIO.h b/cpp/src/qpid/sys/AsynchIO.h index 0a2a1ca1b4..c9893a8045 100644 --- a/cpp/src/qpid/sys/AsynchIO.h +++ b/cpp/src/qpid/sys/AsynchIO.h @@ -21,16 +21,14 @@ * */ -// @@TODO: TAKE THIS OUT... SHould be in posix version. -#include "DispatchHandle.h" - #include -#include +#include namespace qpid { namespace sys { class Socket; +class Poller; /* * Asynchronous acceptor: accepts connections then does a callback with the @@ -47,7 +45,7 @@ private: public: AsynchAcceptor(const Socket& s, Callback callback); ~AsynchAcceptor(); - void start(Poller::shared_ptr poller); + void start(boost::shared_ptr poller); }; /* @@ -66,7 +64,7 @@ public: // deletes. To correctly manage heaps when needed, the allocate and // delete should both be done from the same class/library. static AsynchConnector* create(const Socket& s, - Poller::shared_ptr poller, + boost::shared_ptr poller, std::string hostname, uint16_t port, ConnectedCallback connCb, @@ -131,7 +129,7 @@ public: public: virtual void queueForDeletion() = 0; - virtual void start(Poller::shared_ptr poller) = 0; + virtual void start(boost::shared_ptr poller) = 0; virtual void queueReadBuffer(BufferBase* buff) = 0; virtual void unread(BufferBase* buff) = 0; virtual void queueWrite(BufferBase* buff) = 0; diff --git a/cpp/src/qpid/sys/TCPIOPlugin.cpp b/cpp/src/qpid/sys/TCPIOPlugin.cpp index c6e45b8fa4..636b903e29 100644 --- a/cpp/src/qpid/sys/TCPIOPlugin.cpp +++ b/cpp/src/qpid/sys/TCPIOPlugin.cpp @@ -25,6 +25,7 @@ #include "qpid/Plugin.h" #include "qpid/sys/Socket.h" +#include "qpid/sys/Poller.h" #include "qpid/broker/Broker.h" #include "qpid/log/Statement.h" diff --git a/cpp/src/qpid/sys/posix/AsynchIO.cpp b/cpp/src/qpid/sys/posix/AsynchIO.cpp index b4fede06fd..8b87039dc8 100644 --- a/cpp/src/qpid/sys/posix/AsynchIO.cpp +++ b/cpp/src/qpid/sys/posix/AsynchIO.cpp @@ -21,6 +21,8 @@ #include "qpid/sys/AsynchIO.h" #include "qpid/sys/Socket.h" +#include "qpid/sys/Poller.h" +#include "qpid/sys/DispatchHandle.h" #include "qpid/sys/Time.h" #include "qpid/log/Statement.h" @@ -201,8 +203,7 @@ void AsynchConnector::connComplete(DispatchHandle& h) connCallback(socket); DispatchHandle::doDelete(); } else { - // TODO: This need to be fixed as strerror isn't thread safe - failure(errCode, std::string(::strerror(errCode))); + failure(errCode, std::string(strError(errCode))); } } diff --git a/cpp/src/qpid/sys/windows/AsynchIO.cpp b/cpp/src/qpid/sys/windows/AsynchIO.cpp index 356d5ba927..409480dbdc 100644 --- a/cpp/src/qpid/sys/windows/AsynchIO.cpp +++ b/cpp/src/qpid/sys/windows/AsynchIO.cpp @@ -24,6 +24,7 @@ #include "qpid/sys/AsynchIO.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Socket.h" +#include "qpid/sys/Poller.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Time.h" #include "qpid/log/Statement.h" @@ -90,6 +91,7 @@ namespace sys { /* * Asynch Acceptor * + * TODO FIX this comment - is it still true? * This implementation uses knowledge that the DispatchHandle handle member * is derived from PollerHandle, which has a reference to the Socket. * No dispatching features of DispatchHandle are used - we just use the -- cgit v1.2.1