summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-03-03 15:18:23 +0000
committerGordon Sim <gsim@apache.org>2008-03-03 15:18:23 +0000
commit85d15f24825296b3c59e6247e7702f749ecb8fa6 (patch)
treec658a44112fbf0e20e1c28df14d6f4a591c4701c /qpid/cpp/src
parent0fb2f5356f1ea96ea0f3ccbc3de54cbd556fc57e (diff)
downloadqpid-python-85d15f24825296b3c59e6247e7702f749ecb8fa6.tar.gz
Allow use of channel 0 for all controls and commands
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@633122 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/broker/ConnectionHandler.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp b/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
index 126e1b2723..0aee420022 100644
--- a/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
+++ b/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
@@ -58,13 +58,16 @@ void ConnectionHandler::handle(framing::AMQFrame& frame)
{
AMQMethodBody* method=frame.getBody()->getMethod();
try{
+ bool handled = false;
if (handler->serverMode) {
- if (!invoke(static_cast<AMQP_ServerOperations::Connection010Handler&>(*handler.get()), *method))
- throw ChannelErrorException(QPID_MSG("Class can't be accessed over channel 0"));
+ handled = invoke(static_cast<AMQP_ServerOperations::Connection010Handler&>(*handler.get()), *method);
} else {
- if (!invoke(static_cast<AMQP_ClientOperations::ConnectionHandler&>(*handler.get()), *method))
- throw ChannelErrorException(QPID_MSG("Class can't be accessed over channel 0"));
+ handled = invoke(static_cast<AMQP_ClientOperations::ConnectionHandler&>(*handler.get()), *method);
}
+ if (!handled) {
+ handler->connection.getChannel(frame.getChannel()).in(frame);
+ }
+
}catch(ConnectionException& e){
handler->client.close(e.code, e.what(), method->amqpClassId(), method->amqpMethodId());
}catch(std::exception& e){