diff options
author | Gordon Sim <gsim@apache.org> | 2008-03-03 15:18:23 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2008-03-03 15:18:23 +0000 |
commit | d3c008daa45d37daae7d9679b0a5b8ffdf92a071 (patch) | |
tree | f21dee543112c180512e73d58838ff7ddf4652c8 /cpp | |
parent | b4dac41573e33e1a04a2b7b8c9a35f5e72b662bc (diff) | |
download | qpid-python-d3c008daa45d37daae7d9679b0a5b8ffdf92a071.tar.gz |
Allow use of channel 0 for all controls and commands
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@633122 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/broker/ConnectionHandler.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cpp/src/qpid/broker/ConnectionHandler.cpp b/cpp/src/qpid/broker/ConnectionHandler.cpp index 126e1b2723..0aee420022 100644 --- a/cpp/src/qpid/broker/ConnectionHandler.cpp +++ b/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){ |