diff options
| author | Ted Ross <tross@apache.org> | 2008-11-26 20:48:44 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2008-11-26 20:48:44 +0000 |
| commit | 2b734ff4fcdc50570cd2968d058825d854d1a074 (patch) | |
| tree | c4b06ad20d2174ad97eb1575efa305587414079f /cpp/src/qpid/agent | |
| parent | de3ee556236aaa9d46509eb78c9c3f244fc0f90b (diff) | |
| download | qpid-python-2b734ff4fcdc50570cd2968d058825d854d1a074.tar.gz | |
Bug fixes for QMF:
ManagementAgentImpl - don't send messages if broker is not connected.
ManagementBroker - agents could be assigned the same agentBank
- don't send console-attached for attached agents
- handle multiple qmf messages in an AMQP body
schema.py - Don't use the FieldTable copy-constructor, use .clear()
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@720973 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/agent')
| -rw-r--r-- | cpp/src/qpid/agent/ManagementAgentImpl.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/cpp/src/qpid/agent/ManagementAgentImpl.cpp b/cpp/src/qpid/agent/ManagementAgentImpl.cpp index 1f7d2569fb..050f29ac7b 100644 --- a/cpp/src/qpid/agent/ManagementAgentImpl.cpp +++ b/cpp/src/qpid/agent/ManagementAgentImpl.cpp @@ -262,7 +262,7 @@ void ManagementAgentImpl::startProtocol() systemId.encode (buffer); buffer.putLong(requestedBrokerBank); buffer.putLong(requestedAgentBank); - uint32_t length = 512 - buffer.available(); + uint32_t length = buffer.getPosition(); buffer.reset(); connThreadBody.sendBuffer(buffer, length, "qpid.management", "broker"); if (debugLevel >= DEBUG_PROTO) { @@ -607,15 +607,17 @@ ManagementAgentImpl::PackageMap::iterator ManagementAgentImpl::findOrAddPackage( pair<PackageMap::iterator, bool> result = packages.insert(pair<string, ClassMap>(name, ClassMap())); - // Publish a package-indication message - Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE); - uint32_t outLen; + if (connected) { + // Publish a package-indication message + Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE); + uint32_t outLen; - encodeHeader(outBuffer, 'p'); - encodePackageIndication(outBuffer, result.first); - outLen = MA_BUFFER_SIZE - outBuffer.available(); - outBuffer.reset(); - connThreadBody.sendBuffer(outBuffer, outLen, "qpid.management", "schema.package"); + encodeHeader(outBuffer, 'p'); + encodePackageIndication(outBuffer, result.first); + outLen = MA_BUFFER_SIZE - outBuffer.available(); + outBuffer.reset(); + connThreadBody.sendBuffer(outBuffer, outLen, "qpid.management", "schema.package"); + } return result.first; } |
