summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-01-08 06:20:28 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-01-08 06:20:28 +0000
commit08454f1f40110c92405042da1bc6928052f7fed7 (patch)
treeffd1b98af902200ea199a2ecefd7d5f874bef4c5 /cpp/src/qpid/sys
parentfad74cee5d3cc7f1efb48adafdf52f4242019e54 (diff)
downloadqpid-python-08454f1f40110c92405042da1bc6928052f7fed7.tar.gz
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
Diffstat (limited to 'cpp/src/qpid/sys')
-rw-r--r--cpp/src/qpid/sys/AsynchIO.h12
-rw-r--r--cpp/src/qpid/sys/TCPIOPlugin.cpp1
-rw-r--r--cpp/src/qpid/sys/posix/AsynchIO.cpp5
-rw-r--r--cpp/src/qpid/sys/windows/AsynchIO.cpp2
4 files changed, 11 insertions, 9 deletions
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 <boost/function.hpp>
-#include <deque>
+#include <boost/shared_ptr.hpp>
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> 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> 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> 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