diff options
author | Alan Conway <aconway@apache.org> | 2007-03-27 21:23:40 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-03-27 21:23:40 +0000 |
commit | e919b8ae21a9a92bdea636c7c5de34bda1c29a3d (patch) | |
tree | a7fe9e99a591c67828e050f50993614487a3bb6e /cpp/lib/client | |
parent | b35d8895e662990245385f416163c669391adad3 (diff) | |
download | qpid-python-e919b8ae21a9a92bdea636c7c5de34bda1c29a3d.tar.gz |
* cpp/tests/BrokerChannelTest.cpp: Fix leak.
* cpp/lib/broker/Connection.h: signature fix, pass const& instead of *.
* cpp/lib/client/IncomingMessage.cpp: Correct error codes.
* cpp/lib/broker/Reference.cpp: Fix TODO.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@523085 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/lib/client')
-rw-r--r-- | cpp/lib/client/IncomingMessage.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cpp/lib/client/IncomingMessage.cpp b/cpp/lib/client/IncomingMessage.cpp index 8f69f8c3ef..fb9640b61b 100644 --- a/cpp/lib/client/IncomingMessage.cpp +++ b/cpp/lib/client/IncomingMessage.cpp @@ -35,8 +35,8 @@ IncomingMessage::Destination::~Destination() {} void IncomingMessage::openReference(const std::string& name) { Mutex::ScopedLock l(lock); if (references.find(name) != references.end()) - throw ChannelException( - 406, format("Attempt to open existing reference %s.") % name); + throw ConnectionException( + 503, format("Attempt to open existing reference %s.") % name); references[name]; return; } @@ -84,16 +84,16 @@ void IncomingMessage::addDestination(std::string name, Destination& dest) { if (i == destinations.end()) destinations[name]=&dest; else if (i->second != &dest) - throw ChannelException( - 404, format("Destination already exists: %s.") % name); + throw ConnectionException( + 503, format("Destination already exists: %s.") % name); } void IncomingMessage::removeDestination(std::string name) { Mutex::ScopedLock l(lock); DestinationMap::iterator i = destinations.find(name); if (i == destinations.end()) - throw ChannelException( - 406, format("No such destination: %s.") % name); + throw ConnectionException( + 503, format("No such destination: %s.") % name); destinations.erase(i); } @@ -112,8 +112,8 @@ IncomingMessage::Reference& IncomingMessage::getRefUnlocked( Mutex::ScopedLock l(lock); ReferenceMap::iterator i = references.find(name); if (i == references.end()) - throw ChannelException( - 404, format("No such reference: %s.") % name); + throw ConnectionException( + 503, format("No such reference: %s.") % name); return i->second; } @@ -122,8 +122,8 @@ IncomingMessage::Destination& IncomingMessage::getDestUnlocked( Mutex::ScopedLock l(lock); DestinationMap::iterator i = destinations.find(name); if (i == destinations.end()) - throw ChannelException( - 404, format("No such destination: %s.") % name); + throw ConnectionException( + 503, format("No such destination: %s.") % name); return *i->second; } |