diff options
| author | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-07-02 14:46:30 +0000 |
|---|---|---|
| committer | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-07-02 14:46:30 +0000 |
| commit | 809ec3077dbe82d0b77f46c9a7c6ec90ce0cb555 (patch) | |
| tree | f31563968db738b65fca39495cf9d29738a70f00 /qpid/cpp/src | |
| parent | 572f632cd7fee36544b2f9a09166b258c8bd7280 (diff) | |
| download | qpid-python-809ec3077dbe82d0b77f46c9a7c6ec90ce0cb555.tar.gz | |
QPID-2716: QMF bugfix - set agent name in object id
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@960012 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp b/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp index e2a595cd85..bc841ca3ee 100644 --- a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp +++ b/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp @@ -125,6 +125,12 @@ ManagementAgentImpl::~ManagementAgentImpl() void ManagementAgentImpl::setName(const string& vendor, const string& product, const string& instance) { + if (vendor.find(':') != vendor.npos) { + throw Exception("vendor string cannot contain a ':' character."); + } + if (product.find(':') != product.npos) { + throw Exception("product string cannot contain a ':' character."); + } attrMap["_vendor"] = vendor; attrMap["_product"] = product; string inst; @@ -249,6 +255,7 @@ ObjectId ManagementAgentImpl::addObject(ManagementObject* object, objectId.setV2Key(*object); // let object generate the key else objectId.setV2Key(key); + objectId.setAgentName(name_address); object->setObjectId(objectId); newManagementObjects[objectId] = object; |
