Author: tross Date: Thu Jun 25 21:49:44 2009 New Revision: 788521 URL: http://svn.apache.org/viewvc?rev=788521&view=rev Log: Added const to the Uuid constructor argument.
Without this, calls to Uuid with a const uint8_t* argument were matched by the compiler to the constructor with the boolean argument yielding no warnings but very unpredictable behavior (instead of initializing the Uuid to the initial value, it generated a random value). Also, minor cosmetic cleanup in ManagementAgent.cpp. Modified: qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.h qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp Modified: qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.h?rev=788521&r1=788520&r2=788521&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.h Thu Jun 25 21:49:44 2009 @@ -44,10 +44,10 @@ Uuid(bool unique=false) { if (unique) generate(); else clear(); } /** Copy from 16 bytes of data. */ - Uuid(uint8_t* data) { assign(data); } + Uuid(const uint8_t* data) { assign(data); } /** Copy from 16 bytes of data. */ - void assign(uint8_t* data) { + void assign(const uint8_t* data) { uuid_copy(c_array(), data); } Modified: qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp?rev=788521&r1=788520&r2=788521&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp Thu Jun 25 21:49:44 2009 @@ -692,7 +692,7 @@ inBuffer.getShortString (key.name); inBuffer.getBin128 (key.hash); - QPID_LOG(debug, "RECV SchemaRequest class=" << packageName << ":" << key.name << " (" << Uuid(key.hash) << + QPID_LOG(debug, "RECV SchemaRequest class=" << packageName << ":" << key.name << "(" << Uuid(key.hash) << "), replyTo=" << replyToKey << " seq=" << sequence); PackageMap::iterator pIter = packages.find(packageName); @@ -734,7 +734,7 @@ inBuffer.getBin128(key.hash); inBuffer.restore(); - QPID_LOG(debug, "RECV SchemaResponse class=" << packageName << ":" << key.name << " (" << Uuid(key.hash) << ")" << " seq=" << sequence); + QPID_LOG(debug, "RECV SchemaResponse class=" << packageName << ":" << key.name << "(" << Uuid(key.hash) << ")" << " seq=" << sequence); PackageMap::iterator pIter = packages.find(packageName); if (pIter != packages.end()) { @@ -759,7 +759,7 @@ outLen = MA_BUFFER_SIZE - outBuffer.available(); outBuffer.reset(); sendBuffer(outBuffer, outLen, mExchange, "schema.class"); - QPID_LOG(debug, "SEND ClassInd class=" << packageName << ":" << key.name << " (" << Uuid(key.hash) << ")" << + QPID_LOG(debug, "SEND ClassInd class=" << packageName << ":" << key.name << "(" << Uuid(key.hash) << ")" << " to=schema.class"); } } --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org