summaryrefslogtreecommitdiff
path: root/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
commit70586d3b1b33760031fbc7b95d2642ec47279eb6 (patch)
treea3ad5b6e422b188799708d74ae830d57c704454c /cpp/src
parent8ccaf2162a97e5a86633d4a3df9a056a54d21dab (diff)
downloadqpid-python-70586d3b1b33760031fbc7b95d2642ec47279eb6.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/qpid@788521 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/framing/Uuid.h4
-rw-r--r--cpp/src/qpid/management/ManagementAgent.cpp6
2 files changed, 5 insertions, 5 deletions
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<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/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");
}
}