diff options
author | Ted Ross <tross@apache.org> | 2009-05-13 17:12:27 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2009-05-13 17:12:27 +0000 |
commit | 740647fbfa747420f60783044a2e3f02d6fee4f4 (patch) | |
tree | 67e6856662688b821fab6dcd36d5460925e39fa6 /cpp | |
parent | 0ebaeb6d1a4d05b8edc9bc4cb7f4bbd83acc58f1 (diff) | |
download | qpid-python-740647fbfa747420f60783044a2e3f02d6fee4f4.tar.gz |
Suppress the return of deleted objects for synchronous management get requests to the broker
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@774438 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/management/ManagementAgent.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/cpp/src/qpid/management/ManagementAgent.cpp b/cpp/src/qpid/management/ManagementAgent.cpp index 77277070d9..8dce82ba84 100644 --- a/cpp/src/qpid/management/ManagementAgent.cpp +++ b/cpp/src/qpid/management/ManagementAgent.cpp @@ -821,12 +821,14 @@ void ManagementAgent::handleGetQueryLH (Buffer& inBuffer, string replyToKey, uin if (object->getConfigChanged() || object->getInstChanged()) object->setUpdateTime(); - encodeHeader(outBuffer, 'g', sequence); - object->writeProperties(outBuffer); - object->writeStatistics(outBuffer, true); - outLen = MA_BUFFER_SIZE - outBuffer.available (); - outBuffer.reset (); - sendBuffer(outBuffer, outLen, dExchange, replyToKey); + if (!object->isDeleted()) { + encodeHeader(outBuffer, 'g', sequence); + object->writeProperties(outBuffer); + object->writeStatistics(outBuffer, true); + outLen = MA_BUFFER_SIZE - outBuffer.available (); + outBuffer.reset (); + sendBuffer(outBuffer, outLen, dExchange, replyToKey); + } } sendCommandComplete(replyToKey, sequence); return; @@ -845,12 +847,14 @@ void ManagementAgent::handleGetQueryLH (Buffer& inBuffer, string replyToKey, uin if (object->getConfigChanged() || object->getInstChanged()) object->setUpdateTime(); - encodeHeader(outBuffer, 'g', sequence); - object->writeProperties(outBuffer); - object->writeStatistics(outBuffer, true); - outLen = MA_BUFFER_SIZE - outBuffer.available (); - outBuffer.reset (); - sendBuffer(outBuffer, outLen, dExchange, replyToKey); + if (!object->isDeleted()) { + encodeHeader(outBuffer, 'g', sequence); + object->writeProperties(outBuffer); + object->writeStatistics(outBuffer, true); + outLen = MA_BUFFER_SIZE - outBuffer.available (); + outBuffer.reset (); + sendBuffer(outBuffer, outLen, dExchange, replyToKey); + } } } |