Author: ritchiem
Date: Wed Oct 28 15:30:15 2009
New Revision: 830586

URL: http://svn.apache.org/viewvc?rev=830586&view=rev
Log:
Pull running acceptor out of Broker run loop

Modified:
    qpid/branches/0.5.x-dev/qpid/cpp/src/posix/QpiddBroker.cpp
    qpid/branches/0.5.x-dev/qpid/cpp/src/qpid/broker/Broker.cpp
    qpid/branches/0.5.x-dev/qpid/cpp/src/tests/BrokerFixture.h

Modified: qpid/branches/0.5.x-dev/qpid/cpp/src/posix/QpiddBroker.cpp
URL: 
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/cpp/src/posix/QpiddBroker.cpp?rev=830586&r1=830585&r2=830586&view=diff
==============================================================================
--- qpid/branches/0.5.x-dev/qpid/cpp/src/posix/QpiddBroker.cpp (original)
+++ qpid/branches/0.5.x-dev/qpid/cpp/src/posix/QpiddBroker.cpp Wed Oct 28 
15:30:15 2009
@@ -124,6 +124,7 @@
     void child() {
         boost::intrusive_ptr<Broker> brokerPtr(new 
Broker(options->parent->broker));
         qpid::broker::SignalHandler::setBroker(brokerPtr);
+        brokerPtr->accept();
         uint16_t port=brokerPtr->getPort(options->daemon.transport);
         ready(port);            // Notify parent.
         brokerPtr->run();
@@ -169,6 +170,7 @@
     else {                  // Non-daemon broker.
         boost::intrusive_ptr<Broker> brokerPtr(new Broker(options->broker));
         broker::SignalHandler::setBroker(brokerPtr);
+        brokerPtr->accept();
         if (options->broker.port == 0 || myOptions->daemon.transport != TCP)
             cout << uint16_t(brokerPtr->getPort(myOptions->daemon.transport)) 
<< endl;
         brokerPtr->run();

Modified: qpid/branches/0.5.x-dev/qpid/cpp/src/qpid/broker/Broker.cpp
URL: 
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/cpp/src/qpid/broker/Broker.cpp?rev=830586&r1=830585&r2=830586&view=diff
==============================================================================
--- qpid/branches/0.5.x-dev/qpid/cpp/src/qpid/broker/Broker.cpp (original)
+++ qpid/branches/0.5.x-dev/qpid/cpp/src/qpid/broker/Broker.cpp Wed Oct 28 
15:30:15 2009
@@ -309,7 +309,6 @@
 }
 
 void Broker::run() {
-    accept();
     QPID_LOG(notice, "Broker running");
     Dispatcher d(poller);
     int numIOThreads = config.workerThreads;

Modified: qpid/branches/0.5.x-dev/qpid/cpp/src/tests/BrokerFixture.h
URL: 
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/cpp/src/tests/BrokerFixture.h?rev=830586&r1=830585&r2=830586&view=diff
==============================================================================
--- qpid/branches/0.5.x-dev/qpid/cpp/src/tests/BrokerFixture.h (original)
+++ qpid/branches/0.5.x-dev/qpid/cpp/src/tests/BrokerFixture.h Wed Oct 28 
15:30:15 2009
@@ -66,6 +66,7 @@
         // TODO aconway 2007-12-05: At one point BrokerFixture
         // tests could hang in Connection ctor if the following
         // line is removed. This may not be an issue anymore.
+        broker->accept();
         broker->getPort(qpid::broker::Broker::TCP_TRANSPORT);
         brokerThread = qpid::sys::Thread(*broker);
     };



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscr...@qpid.apache.org

Reply via email to