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 | ab19c12851d40de5f2a330d898e181909b827ea9 (patch) | |
tree | 55c084689be462e5b08b97b44d021ddf1eb83ec6 /qpid/cpp/lib/client | |
parent | 23c5446b9425bfaed254a93fc2250c54adddfc80 (diff) | |
download | qpid-python-ab19c12851d40de5f2a330d898e181909b827ea9.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@523085 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/lib/client')
-rw-r--r-- | qpid/cpp/lib/client/IncomingMessage.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/qpid/cpp/lib/client/IncomingMessage.cpp b/qpid/cpp/lib/client/IncomingMessage.cpp index 8f69f8c3ef..fb9640b61b 100644 --- a/qpid/cpp/lib/client/IncomingMessage.cpp +++ b/qpid/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; } |