NO-JIRA: Fix valgrind error with gcc in c++11 mode.

Not sure why the error was occurring but a trivial re-factor fixes it.
Error was showing up after python_tests:

==27260== Conditional jump or move depends on uninitialised value(s)
==27260==    at 0x5188FBA: ~shared_count (shared_count.hpp:473)
==27260==    by 0x5188FBA: ~shared_ptr (shared_ptr.hpp:336)
==27260==    by 0x5188FBA: qpid::broker::SessionAdapter::ExchangeHandlerImpl::checkAlternate(boost::shared_ptr<qpid::broker::Exchange>, boost::shared_ptr<qpid::broker::Exchange>) (SessionAdapter.cpp:120)
==27260==    by 0x518A666: qpid::broker::SessionAdapter::ExchangeHandlerImpl::declare(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, bool, qpid::framing::FieldTable const&) (SessionAdapter.cpp:94)
==27260==    by 0x55B0331: invoke<qpid::framing::AMQP_ServerOperations::ExchangeHandler> (ExchangeDeclareBody.h:104)
==27260==    by 0x55B0331: qpid::framing::AMQP_ServerOperations::ExchangeHandler::Invoker::visit(qpid::framing::ExchangeDeclareBody const&) (ServerInvoker.cpp:630)
==27260==    by 0x55B6C11: accept (ExchangeDeclareBody.h:108)
==27260==    by 0x55B6C11: qpid::framing::AMQP_ServerOperations::Invoker::visit(qpid::framing::ExchangeDeclareBody const&) (ServerInvoker.cpp:338)
==27260==    by 0x5192BC0: invoke<qpid::broker::SessionAdapter> (Invoker.h:67)
==27260==    by 0x5192BC0: qpid::broker::SessionState::handleCommand(qpid::framing::AMQMethodBody*) (SessionState.cpp:198)
==27260==    by 0x5196F54: qpid::broker::SessionState::handleIn(qpid::framing::AMQFrame&) (SessionState.cpp:295)
==27260==    by 0x5647A0D: qpid::amqp_0_10::SessionHandler::handleIn(qpid::framing::AMQFrame&) (SessionHandler.cpp:93)
==27260==    by 0x50F37DA: operator() (Handler.h:39)
==27260==    by 0x50F37DA: qpid::broker::ConnectionHandler::handle(qpid::framing::AMQFrame&) (ConnectionHandler.cpp:93)
==27260==    by 0x50ED3A3: qpid::broker::amqp_0_10::Connection::received(qpid::framing::AMQFrame&) (Connection.cpp:198)
==27260==    by 0x506CEAF: qpid::amqp_0_10::Connection::decode(char const*, unsigned long) (Connection.cpp:59)
==27260==    by 0x566C567: qpid::sys::AsynchIOHandler::readbuff(qpid::sys::AsynchIO&, qpid::sys::AsynchIOBufferBase*) (AsynchIOHandler.cpp:138)
==27260==    by 0x55EF980: operator() (function_template.hpp:771)
==27260==    by 0x55EF980: qpid::sys::posix::AsynchIO::readable(qpid::sys::DispatchHandle&) (AsynchIO.cpp:453)
==27260==    by 0x566EFCC: operator() (function_template.hpp:771)
==27260==    by 0x566EFCC: qpid::sys::DispatchHandle::processEvent(qpid::sys::Poller::EventType) (DispatchHandle.cpp:280)
==27260==    by 0x5615925: process (Poller.h:131)
==27260==    by 0x5615925: qpid::sys::Poller::run() (EpollPoller.cpp:522)
==27260==    by 0x5605229: qpid::sys::(anonymous namespace)::runRunnable(void*) (Thread.cpp:35)
==27260==    by 0x61E55C9: start_thread (pthread_create.c:333)
==27260==    by 0x64FCF6C: clone (clone.S:109)
==27260==
1 file changed
tree: 7fe66a5f0a135d294b6083bcbbce45e513569a62
  1. bindings/
  2. CMakeModules/
  3. docs/
  4. etc/
  5. examples/
  6. include/
  7. management/
  8. managementgen/
  9. packaging/
  10. rubygen/
  11. specs/
  12. src/
  13. .gitignore
  14. .travis.yml
  15. appveyor.yml
  16. BuildInstallSettings.cmake
  17. cmake_uninstall.cmake.in
  18. CMakeLists.txt
  19. CTestConfig.cmake
  20. CTestCustom.cmake
  21. INSTALL-WINDOWS.txt
  22. INSTALL.txt
  23. LICENSE.txt
  24. NOTICE.txt
  25. README.md
  26. VERSION.txt
README.md

Qpid C++

Introduction

Qpid C++ is a C++ implementation of the AMQP protocol described at http://amqp.org/.

For additional software or information on the Qpid project go to:

http://qpid.apache.org

For documentation, go to:

http://qpid.apache.org/documentation

Available documentation

  • INSTALL.txt - How to install Qpid C++
  • LICENSE.txt - The Apache license
  • NOTICE.txt - Corresponds to the section 4 d of the Apache License, Version 2.0
  • docs/ - Feature and design notes, other documentation

Quick start

In C++ distributions:

mkdir BLD      # The recommended way to use cmake is in a separate
               # build directory
cd BLD
cmake ..       # Generates code and makefiles
make test      # Runs tests
make install   # Installs the client and daemon

The INSTALL.txt notes contain more detailed information on compiling and installing this software.

examples/README.txt describes the C++ client API examples.