activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1213416 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main: activemq/commands/ activemq/transport/correlator/ activemq/wireformat/openwire/ activemq/wireformat/openwire/marshal/ decaf/util/concurrent/atomic/
Date Mon, 12 Dec 2011 20:22:18 GMT
Author: tabish
Date: Mon Dec 12 20:22:17 2011
New Revision: 1213416

URL: http://svn.apache.org/viewvc?rev=1213416&view=rev
Log:
apply fixes for: https://issues.apache.org/jira/browse/AMQCPP-385

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/correlator/ResponseCorrelator.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/atomic/AtomicRefCounter.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp?rev=1213416&r1=1213415&r2=1213416&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp
Mon Dec 12 20:22:17 2011
@@ -584,7 +584,7 @@ void ActiveMQBytesMessage::storeContent(
 
             if( !this->compressed ) {
 
-                std::pair<const unsigned char*, int> array = this->bytesOut->toByteArray();
+                std::pair<unsigned char*, int> array = this->bytesOut->toByteArray();
                 this->setContent( std::vector<unsigned char>( array.first, array.first
+ array.second ) );
                 delete [] array.first;
 
@@ -600,7 +600,7 @@ void ActiveMQBytesMessage::storeContent(
                 this->bytesOut->writeTo( &doBuffer );
 
                 // Now store the annotated content.
-                std::pair<const unsigned char*, int> array = buffer.toByteArray();
+                std::pair<unsigned char*, int> array = buffer.toByteArray();
                 this->setContent( std::vector<unsigned char>( array.first, array.first
+ array.second ) );
                 delete [] array.first;
             }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp?rev=1213416&r1=1213415&r2=1213416&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp
Mon Dec 12 20:22:17 2011
@@ -119,7 +119,7 @@ void ActiveMQMapMessage::beforeMarshal( 
             PrimitiveTypesMarshaller::marshalMap( map.get(), dataOut );
             dataOut.close();
 
-            std::pair<const unsigned char*, int> array = bytesOut->toByteArray();
+            std::pair<unsigned char*, int> array = bytesOut->toByteArray();
             this->setContent( std::vector<unsigned char>( array.first, array.first
+ array.second ) );
             delete [] array.first;
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp?rev=1213416&r1=1213415&r2=1213416&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
Mon Dec 12 20:22:17 2011
@@ -845,7 +845,7 @@ void ActiveMQStreamMessage::storeContent
         this->dataOut->close();
 
         if( this->bytesOut->size() > 0 ) {
-            std::pair<const unsigned char*, int> array = this->bytesOut->toByteArray();
+            std::pair<unsigned char*, int> array = this->bytesOut->toByteArray();
             this->setContent( std::vector<unsigned char>( array.first, array.first
+ array.second ) );
             delete [] array.first;
         }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp?rev=1213416&r1=1213415&r2=1213416&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp
Mon Dec 12 20:22:17 2011
@@ -139,7 +139,7 @@ void ActiveMQTextMessage::beforeMarshal(
         dataOut.close();
 
         if( bytesOut->size() > 0 ) {
-            std::pair<const unsigned char*, int> array = bytesOut->toByteArray();
+            std::pair<unsigned char*, int> array = bytesOut->toByteArray();
             this->setContent( std::vector<unsigned char>( array.first, array.first
+ array.second ) );
             delete [] array.first;
         }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/correlator/ResponseCorrelator.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/correlator/ResponseCorrelator.cpp?rev=1213416&r1=1213415&r2=1213416&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/correlator/ResponseCorrelator.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/correlator/ResponseCorrelator.cpp
Mon Dec 12 20:22:17 2011
@@ -103,7 +103,7 @@ Pointer<Response> ResponseCorrelator::re
         Pointer<FutureResponse> futureResponse( new FutureResponse() );
 
         synchronized( &mapMutex ){
-            requestMap.insert( make_pair( command->getCommandId(), futureResponse ) );
+            requestMap.insert( make_pair( (unsigned int)command->getCommandId(), futureResponse
) );
         }
 
         // The finalizer will cleanup the map even if an exception is thrown.
@@ -147,7 +147,7 @@ Pointer<Response> ResponseCorrelator::re
         Pointer<FutureResponse> futureResponse( new FutureResponse() );
 
         synchronized( &mapMutex ){
-            requestMap.insert( make_pair( command->getCommandId(), futureResponse ) );
+            requestMap.insert( make_pair( (unsigned int)command->getCommandId(), futureResponse
) );
         }
 
         // The finalizer will cleanup the map even if an exception is thrown.

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp?rev=1213416&r1=1213415&r2=1213416&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp
Mon Dec 12 20:22:17 2011
@@ -209,7 +209,7 @@ void OpenWireFormat::marshal( const Poin
                     dataOut->writeInt( (int)baos->size() );
 
                     if( baos->size() > 0 ) {
-                        std::pair<const unsigned char*, int> array = baos->toByteArray();
+                        std::pair<unsigned char*, int> array = baos->toByteArray();
                         dataOut->write( array.first, array.second );
                         delete [] array.first;
                     }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp?rev=1213416&r1=1213415&r2=1213416&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
Mon Dec 12 20:22:17 2011
@@ -52,7 +52,7 @@ void PrimitiveTypesMarshaller::marshal( 
         }
 
         if( bytesOut.size() > 0 ) {
-            std::pair<const unsigned char*, int> array = bytesOut.toByteArray();
+            std::pair<unsigned char*, int> array = bytesOut.toByteArray();
             buffer.insert( buffer.begin(), array.first, array.first + array.second );
             delete [] array.first;
         }
@@ -96,7 +96,7 @@ void PrimitiveTypesMarshaller::marshal( 
         }
 
         if( bytesOut.size() > 0 ) {
-            std::pair<const unsigned char*, int> array = bytesOut.toByteArray();
+            std::pair<unsigned char*, int> array = bytesOut.toByteArray();
             buffer.insert( buffer.begin(), array.first, array.first + array.second );
             delete [] array.first;
         }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/atomic/AtomicRefCounter.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/atomic/AtomicRefCounter.h?rev=1213416&r1=1213415&r2=1213416&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/atomic/AtomicRefCounter.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/atomic/AtomicRefCounter.h
Mon Dec 12 20:22:17 2011
@@ -19,6 +19,7 @@
 #define _DECAF_UTIL_CONCURRENT_ATOMIC_ATOMICREFCOUNTER_H_
 
 #include <decaf/util/concurrent/atomic/AtomicInteger.h>
+#include <algorithm>
 
 namespace decaf{
 namespace util{



Mime
View raw message