Author: gsim
Date: Mon Mar 3 07:18:23 2008
New Revision: 633122
URL: http://svn.apache.org/viewvc?rev=633122&view=rev
Log:
Allow use of channel 0 for all controls and commands
Modified:
incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp?rev=633122&r1=633121&r2=633122&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
(original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp Mon Mar
3 07:18:23 2008
@@ -58,13 +58,16 @@
{
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){