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 2008/08/23 16:40:42 UTC
svn commit: r688333 - in /activemq/activemq-cpp/trunk/src:
examples/producers/SimpleProducer.cpp
main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp
Author: tabish
Date: Sat Aug 23 07:40:42 2008
New Revision: 688333
URL: http://svn.apache.org/viewvc?rev=688333&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQCPP-190
Resolved, max string property that can be marshaled is 65536
Modified:
activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp
activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp
Modified: activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp?rev=688333&r1=688332&r2=688333&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp (original)
+++ activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp Sat Aug 23 07:40:42 2008
@@ -199,7 +199,7 @@
//============================================================
// Total number of messages for this producer to send.
//============================================================
- unsigned int numMessages = 50000;
+ unsigned int numMessages = 2000;
//============================================================
// This is the Destination Name and URI options. Use this to
Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp?rev=688333&r1=688332&r2=688333&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp Sat Aug 23 07:40:42 2008
@@ -100,16 +100,16 @@
if( str != NULL ) {
if( str->size() > 65536 ) {
+
throw IOException(
__FILE__,
__LINE__,
( std::string( "OpenwireStringSupport::writeString - Cannot marshall " ) +
- "string longer than: 65536 characters, supplied steing was: " +
+ "string longer than: 65536 characters, supplied string was: " +
Integer::toString( (int)str->size() ) + " characters long." ).c_str() );
}
- //short strlen = (short)str->size();
- short utflen = 0;
+ unsigned short utflen = 0;
int c, count = 0;
std::string::const_iterator iter = str->begin();
@@ -125,7 +125,7 @@
}
}
- dataOut.writeShort( utflen );
+ dataOut.writeUnsignedShort( utflen );
std::vector<unsigned char> byteArr;
byteArr.resize( utflen );
@@ -145,9 +145,8 @@
}
dataOut.write( byteArr );
- }
- else
- {
+
+ } else {
dataOut.writeShort( (short)-1 );
}
}