summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2009-06-25 21:49:44 +0000
committerTed Ross <tross@apache.org>2009-06-25 21:49:44 +0000
commit65f6261805e5fc4a40df8b3dfe40c682ec4561de (patch)
tree7bc2f5d1ac8f1f03e7e0acb8e1f9326351a5408a /qpid/cpp/src
parent89c9507bf7594f34110b085317d464131870eb5f (diff)
downloadqpid-python-65f6261805e5fc4a40df8b3dfe40c682ec4561de.tar.gz
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@788521 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/framing/Uuid.h4
-rw-r--r--qpid/cpp/src/qpid/management/ManagementAgent.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/qpid/cpp/src/qpid/framing/Uuid.h b/qpid/cpp/src/qpid/framing/Uuid.h
index b595a2ff42..33be497c64 100644
--- a/qpid/cpp/src/qpid/framing/Uuid.h
+++ b/qpid/cpp/src/qpid/framing/Uuid.h
@@ -44,10 +44,10 @@ struct Uuid : public boost::array<uint8_t, 16> {
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/qpid/cpp/src/qpid/management/ManagementAgent.cpp b/qpid/cpp/src/qpid/management/ManagementAgent.cpp
index 190e1d5778..75f7453058 100644
--- a/qpid/cpp/src/qpid/management/ManagementAgent.cpp
+++ b/qpid/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");
}
}