summaryrefslogtreecommitdiff
path: root/cpp/src/qpid
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
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')
-rw-r--r--cpp/src/qpid/broker/Broker.h2
-rw-r--r--cpp/src/qpid/client/Connector.cpp2
-rw-r--r--cpp/src/qpid/client/RdmaConnector.cpp2
-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
7 files changed, 11 insertions, 15 deletions
diff --git a/cpp/src/qpid/broker/Broker.h b/cpp/src/qpid/broker/Broker.h
index c64bfa8a9f..ac972b0325 100644
--- a/cpp/src/qpid/broker/Broker.h
+++ b/cpp/src/qpid/broker/Broker.h
@@ -205,8 +205,6 @@ class Broker : public sys::Runnable, public Plugin::Target,
const std::string& destQueue,
uint32_t qty);
- // TODO: There isn't a single ProtocolFactory so the use of the following needs to be fixed
- // For the present just return the first ProtocolFactory registered.
boost::shared_ptr<sys::ProtocolFactory> getProtocolFactory(const std::string& name = TCP_TRANSPORT) const;
/** Expose poller so plugins can register their descriptors. */
diff --git a/cpp/src/qpid/client/Connector.cpp b/cpp/src/qpid/client/Connector.cpp
index 0e11b920e1..5cdde723af 100644
--- a/cpp/src/qpid/client/Connector.cpp
+++ b/cpp/src/qpid/client/Connector.cpp
@@ -373,8 +373,6 @@ void TCPConnector::eof(AsynchIO&) {
handleClosed();
}
-// TODO: astitcher 20070908 This version of the code can never time out, so the idle processing
-// will never be called
void TCPConnector::run() {
// Keep the connection impl in memory until run() completes.
boost::shared_ptr<ConnectionImpl> protect = impl.lock();
diff --git a/cpp/src/qpid/client/RdmaConnector.cpp b/cpp/src/qpid/client/RdmaConnector.cpp
index 3cc8961eea..8e330448c9 100644
--- a/cpp/src/qpid/client/RdmaConnector.cpp
+++ b/cpp/src/qpid/client/RdmaConnector.cpp
@@ -365,8 +365,6 @@ void RdmaConnector::eof(Rdma::AsynchIO&) {
handleClosed();
}
-// TODO: astitcher 20070908 This version of the code can never time out, so the idle processing
-// will never be called
void RdmaConnector::run(){
// Keep the connection impl in memory until run() completes.
//GRS: currently the ConnectionImpls destructor is where the Io thread is joined
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