summaryrefslogtreecommitdiff
path: root/cpp/src/qpid
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid')
-rw-r--r--cpp/src/qpid/broker/Broker.cpp4
-rw-r--r--cpp/src/qpid/sys/AsynchIOAcceptor.cpp7
-rw-r--r--cpp/src/qpid/sys/Serializer.cpp4
3 files changed, 8 insertions, 7 deletions
diff --git a/cpp/src/qpid/broker/Broker.cpp b/cpp/src/qpid/broker/Broker.cpp
index fa183979e1..98487631cf 100644
--- a/cpp/src/qpid/broker/Broker.cpp
+++ b/cpp/src/qpid/broker/Broker.cpp
@@ -149,12 +149,14 @@ std::string Broker::getUrl() const {
}
Acceptor& Broker::getAcceptor() const {
- if (!acceptor)
+ if (!acceptor) {
const_cast<Acceptor::shared_ptr&>(acceptor) =
Acceptor::create(config.port,
config.connectionBacklog,
config.workerThreads,
false);
+ QPID_LOG(info, "Listening on port " << getPort());
+ }
return *acceptor;
}
diff --git a/cpp/src/qpid/sys/AsynchIOAcceptor.cpp b/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
index 8d6b543dc9..93cf35a043 100644
--- a/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
+++ b/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
@@ -159,19 +159,18 @@ void AsynchIOAcceptor::run(ConnectionInputHandlerFactory* fact) {
boost::bind(&AsynchIOAcceptor::accepted, this, poller, _1, fact));
acceptor.start(poller);
- std::vector<Thread*> t(numIOThreads-1);
+ std::vector<Thread> t(numIOThreads-1);
// Run n-1 io threads
for (int i=0; i<numIOThreads-1; ++i)
- t[i] = new Thread(d);
+ t[i] = Thread(d);
// Run final thread
d.run();
// Now wait for n-1 io threads to exit
for (int i=0; i>numIOThreads-1; ++i) {
- t[i]->join();
- delete t[i];
+ t[i].join();
}
}
diff --git a/cpp/src/qpid/sys/Serializer.cpp b/cpp/src/qpid/sys/Serializer.cpp
index cdc8b91694..faf94a0f93 100644
--- a/cpp/src/qpid/sys/Serializer.cpp
+++ b/cpp/src/qpid/sys/Serializer.cpp
@@ -55,11 +55,11 @@ void Serializer::dispatch(Task& task) {
try {
task();
} catch (const std::exception& e) {
- QPID_LOG(error, "Unexpected exception in Serializer::dispatch"
+ QPID_LOG(critical, "Unexpected exception in Serializer::dispatch"
<< e.what());
assert(0); // Should not happen.
} catch (...) {
- QPID_LOG(error, "Unexpected exception in Serializer::dispatch.");
+ QPID_LOG(critical, "Unexpected exception in Serializer::dispatch.");
assert(0); // Should not happen.
}
}