diff options
author | Alan Conway <aconway@apache.org> | 2007-08-08 13:42:23 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-08-08 13:42:23 +0000 |
commit | b355ad32211ffc96b7a7516d89f894e471828460 (patch) | |
tree | d1fa8a999d3ca584b088d5e82044aa26326c5a32 /cpp/src/qpid | |
parent | 34b5e61791cad67128ad2aff29a52576a737c7af (diff) | |
download | qpid-python-b355ad32211ffc96b7a7516d89f894e471828460.tar.gz |
* src/tests/start_broker: Pass script parameters to broker.
* src/qpid/sys/Serializer.cpp: Corrected log levels.
* src/tests/.valgrind.supp-default: Suppress probably benign
leaks and uninit param errors from asynch IO code.
Need verification they are beningn.
* src/qpid/sys/AsynchIOAcceptor.cpp(run): Fix memory leak.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@563879 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
-rw-r--r-- | cpp/src/qpid/broker/Broker.cpp | 4 | ||||
-rw-r--r-- | cpp/src/qpid/sys/AsynchIOAcceptor.cpp | 7 | ||||
-rw-r--r-- | cpp/src/qpid/sys/Serializer.cpp | 4 |
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. } } |