From 70586d3b1b33760031fbc7b95d2642ec47279eb6 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Thu, 25 Jun 2009 21:49:44 +0000 Subject: 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. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@788521 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/framing/Uuid.h | 4 ++-- cpp/src/qpid/management/ManagementAgent.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/framing/Uuid.h b/cpp/src/qpid/framing/Uuid.h index b595a2ff42..33be497c64 100644 --- a/cpp/src/qpid/framing/Uuid.h +++ b/cpp/src/qpid/framing/Uuid.h @@ -44,10 +44,10 @@ struct Uuid : public boost::array { 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); } diff --git a/cpp/src/qpid/management/ManagementAgent.cpp b/cpp/src/qpid/management/ManagementAgent.cpp index 190e1d5778..75f7453058 100644 --- a/cpp/src/qpid/management/ManagementAgent.cpp +++ b/cpp/src/qpid/management/ManagementAgent.cpp @@ -692,7 +692,7 @@ void ManagementAgent::handleSchemaRequestLH(Buffer& inBuffer, string replyToKey, 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 @@ void ManagementAgent::handleSchemaResponseLH(Buffer& inBuffer, string /*replyToK 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 @@ void ManagementAgent::handleSchemaResponseLH(Buffer& inBuffer, string /*replyToK 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"); } } -- cgit v1.2.1