You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2011/12/12 21:27:06 UTC
svn commit: r1213418 - in
/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq:
commands/ transport/correlator/ wireformat/openwire/
wireformat/openwire/marshal/
Author: tabish
Date: Mon Dec 12 20:27:06 2011
New Revision: 1213418
URL: http://svn.apache.org/viewvc?rev=1213418&view=rev
Log:
apply fixes for: https://issues.apache.org/jira/browse/AMQCPP-385
Modified:
activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp
activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp
activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp
activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/transport/correlator/ResponseCorrelator.cpp
activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp
activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
Modified: activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp?rev=1213418&r1=1213417&r2=1213418&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp (original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp Mon Dec 12 20:27:06 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/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp?rev=1213418&r1=1213417&r2=1213418&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp (original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp Mon Dec 12 20:27:06 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/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp?rev=1213418&r1=1213417&r2=1213418&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp (original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp Mon Dec 12 20:27:06 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/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp?rev=1213418&r1=1213417&r2=1213418&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp (original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp Mon Dec 12 20:27:06 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/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/transport/correlator/ResponseCorrelator.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/transport/correlator/ResponseCorrelator.cpp?rev=1213418&r1=1213417&r2=1213418&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/transport/correlator/ResponseCorrelator.cpp (original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/transport/correlator/ResponseCorrelator.cpp Mon Dec 12 20:27:06 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/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp?rev=1213418&r1=1213417&r2=1213418&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp (original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp Mon Dec 12 20:27:06 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/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp?rev=1213418&r1=1213417&r2=1213418&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp (original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp Mon Dec 12 20:27:06 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;
}