Author: tabish
Date: Mon Nov 23 20:30:47 2009
New Revision: 883488

URL: http://svn.apache.org/viewvc?rev=883488&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQCPP-250

Update the WireFormat negotiator to ensure the WireFormat command is sent down 
the Transport chain so that everyone gets a chance to process it.

Modified:
    
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatNegotiator.cpp

Modified: 
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatNegotiator.cpp
URL: 
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatNegotiator.cpp?rev=883488&r1=883487&r2=883488&view=diff
==============================================================================
--- 
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatNegotiator.cpp
 (original)
+++ 
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatNegotiator.cpp
 Mon Nov 23 20:30:47 2009
@@ -218,18 +218,8 @@
 
         try {
 
-            // Circumvent all other Transport filters and go straight for the 
base
-            // IOTransport, this should guarantee that there's no funny 
business done
-            // like async dispatch etc.  If it can't be found just use next 
and hope that
-            // there's nothing that will break the necessary thread locking 
that protects
-            // the message as it marshaled out to the wire
-            Transport* transport = this->next->narrow( typeid( 
transport::IOTransport ) );
-            if( transport == NULL ) {
-                transport = this->next.get();
-            }
-
             // We first send the WireFormat that we'd prefer.
-            transport->oneway( openWireFormat->getPreferedWireFormatInfo() );
+            this->next->oneway( openWireFormat->getPreferedWireFormatInfo() );
 
             // Mark the latch
             wireInfoSentDownLatch.countDown();


Reply via email to