summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Connection.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2011-11-23 16:01:25 +0000
committerGordon Sim <gsim@apache.org>2011-11-23 16:01:25 +0000
commitc8f2e652489ca0fab6b4ce15416b16afdcd6b556 (patch)
treea434a0aaf73630fafebd5038e112d7e4efd7f5bc /cpp/src/qpid/cluster/Connection.cpp
parentceca56258e7d3b8aabd2eadbd00857eb69e825f5 (diff)
downloadqpid-python-c8f2e652489ca0fab6b4ce15416b16afdcd6b556.tar.gz
QPID-3629: Changed management of credit window
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1205467 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Connection.cpp')
-rw-r--r--cpp/src/qpid/cluster/Connection.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp
index 394749aad2..17fcf6deb5 100644
--- a/cpp/src/qpid/cluster/Connection.cpp
+++ b/cpp/src/qpid/cluster/Connection.cpp
@@ -404,11 +404,13 @@ void Connection::shadowSetUser(const std::string& userId) {
connection->setUserId(userId);
}
-void Connection::consumerState(const string& name, bool blocked, bool notifyEnabled, const SequenceNumber& position)
+void Connection::consumerState(const string& name, bool blocked, bool notifyEnabled, const SequenceNumber& position,
+ uint32_t usedMsgCredit, uint32_t usedByteCredit)
{
broker::SemanticState::ConsumerImpl::shared_ptr c = semanticState().find(name);
c->position = position;
c->setBlocked(blocked);
+ if (c->getCredit().isWindowMode()) c->getCredit().consume(usedMsgCredit, usedByteCredit);
if (notifyEnabled) c->enableNotify(); else c->disableNotify();
updateIn.consumerNumbering.add(c);
}