summaryrefslogtreecommitdiff
path: root/cpp/src/posix/QpiddBroker.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-10-16 18:47:52 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-10-16 18:47:52 +0000
commit704d3c7c2ff39309e28dbd1ba006b1cc2b3a63c0 (patch)
tree7a56dac9c5584728fe47d6b1e6b53ce27518a3e9 /cpp/src/posix/QpiddBroker.cpp
parent18b24ce73d0740ad7df97ccca6cec5e2ba9d3ec2 (diff)
downloadqpid-python-704d3c7c2ff39309e28dbd1ba006b1cc2b3a63c0.tar.gz
Pull running acceptor out of Broker run loop
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@826033 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/posix/QpiddBroker.cpp')
-rw-r--r--cpp/src/posix/QpiddBroker.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpp/src/posix/QpiddBroker.cpp b/cpp/src/posix/QpiddBroker.cpp
index 3a20087062..083b79896e 100644
--- a/cpp/src/posix/QpiddBroker.cpp
+++ b/cpp/src/posix/QpiddBroker.cpp
@@ -124,6 +124,7 @@ struct QpiddDaemon : public Daemon {
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 @@ int QpiddBroker::execute (QpiddOptions *options) {
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();