You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2009/01/08 07:20:28 UTC

svn commit: r732620 - in /qpid/trunk/qpid/cpp/src/qpid: broker/Broker.h client/Connector.cpp client/RdmaConnector.cpp sys/AsynchIO.h sys/TCPIOPlugin.cpp sys/posix/AsynchIO.cpp sys/windows/AsynchIO.cpp

Author: astitcher
Date: Wed Jan  7 22:20:28 2009
New Revision: 732620

URL: http://svn.apache.org/viewvc?rev=732620&view=rev
Log:
Tidied up a number of TODO items

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h
    qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIO.h
    qpid/trunk/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h?rev=732620&r1=732619&r2=732620&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h Wed Jan  7 22:20:28 2009
@@ -205,8 +205,6 @@
 			    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. */

Modified: qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp?rev=732620&r1=732619&r2=732620&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp Wed Jan  7 22:20:28 2009
@@ -373,8 +373,6 @@
     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();

Modified: qpid/trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp?rev=732620&r1=732619&r2=732620&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp Wed Jan  7 22:20:28 2009
@@ -365,8 +365,6 @@
     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

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIO.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIO.h?rev=732620&r1=732619&r2=732620&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIO.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIO.h Wed Jan  7 22:20:28 2009
@@ -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 @@
 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 @@
     // 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:
     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;

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp?rev=732620&r1=732619&r2=732620&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp Wed Jan  7 22:20:28 2009
@@ -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"
 

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp?rev=732620&r1=732619&r2=732620&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp Wed Jan  7 22:20:28 2009
@@ -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 @@
         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)));
     }
 }
 

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp?rev=732620&r1=732619&r2=732620&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp Wed Jan  7 22:20:28 2009
@@ -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 @@
 /*
  * 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