You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2015/01/13 11:25:09 UTC

svn commit: r1651320 - /qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp

Author: gsim
Date: Tue Jan 13 10:25:08 2015
New Revision: 1651320

URL: http://svn.apache.org/r1651320
Log:
QPID-6310: handle case where content bearing method is not in fact a message-transfer, which is the only one currently supported by qpidd

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp?rev=1651320&r1=1651319&r2=1651320&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp Tue Jan 13 10:25:08 2015
@@ -45,6 +45,9 @@ void MessageBuilder::handle(AMQFrame& fr
     switch(state) {
     case METHOD:
         checkType(METHOD_BODY, type);
+        if (!frame.getMethod()->isA<qpid::framing::MessageTransferBody>())
+            throw NotImplementedException(QPID_MSG("Unexpected method: " << *(frame.getMethod())));
+
         exchange = frame.castBody<qpid::framing::MessageTransferBody>()->getDestination();
         state = HEADER;
         break;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org