activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmitt...@apache.org
Subject svn commit: r506129 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/WireFormatInfo.cpp
Date Sun, 11 Feb 2007 20:49:08 GMT
Author: nmittler
Date: Sun Feb 11 12:49:07 2007
New Revision: 506129

URL: http://svn.apache.org/viewvc?view=rev&rev=506129
Log:
[AMQCPP-30] Fixed initialization of magic member in OpenwireFormatInfo

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/WireFormatInfo.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/WireFormatInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/WireFormatInfo.cpp?view=diff&rev=506129&r1=506128&r2=506129
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/WireFormatInfo.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/WireFormatInfo.cpp
Sun Feb 11 12:49:07 2007
@@ -31,6 +31,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 WireFormatInfo::WireFormatInfo()
 {
+    // Initialize the static MAGIC buffer.
     if( MAGIC.empty() ) {
         MAGIC.push_back( 'A' );
         MAGIC.push_back( 'c' );
@@ -40,6 +41,12 @@
         MAGIC.push_back( 'e' );
         MAGIC.push_back( 'M' );
         MAGIC.push_back( 'Q' );
+    }
+    
+    // Initialize member magic buffer to the static buffer.
+    magic.resize( MAGIC.size() );
+    for( int ix=0; ix<MAGIC.size(); ++ix ){
+        magic[ix] = MAGIC[ix];
     }
 }
 



Mime
View raw message