diff options
| author | Gordon Sim <gsim@apache.org> | 2012-11-23 16:56:43 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2012-11-23 16:56:43 +0000 |
| commit | a58d1b57a5694e474b8f140c99bcf2933174e6e8 (patch) | |
| tree | 6b332280b7b04d214ae3656cd36a89f829b5c8b5 /cpp/src | |
| parent | 50f482aa2e12a7105c3a95dc8bc3105c9a6b24a7 (diff) | |
| download | qpid-python-a58d1b57a5694e474b8f140c99bcf2933174e6e8.tar.gz | |
QPID-4459: settle sent messages once they have been accepted by peer
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1412960 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/qpid/messaging/amqp/SenderContext.cpp | 6 | ||||
| -rw-r--r-- | cpp/src/qpid/messaging/amqp/SenderContext.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/qpid/messaging/amqp/SenderContext.cpp b/cpp/src/qpid/messaging/amqp/SenderContext.cpp index 9dc7c25121..96c4437b89 100644 --- a/cpp/src/qpid/messaging/amqp/SenderContext.cpp +++ b/cpp/src/qpid/messaging/amqp/SenderContext.cpp @@ -95,6 +95,7 @@ uint32_t SenderContext::processUnsettled() { //remove accepted messages from front of deque while (!deliveries.empty() && deliveries.front().accepted()) { + deliveries.front().settle(); deliveries.pop_front(); } return deliveries.size(); @@ -336,7 +337,10 @@ bool SenderContext::Delivery::accepted() { return pn_delivery_remote_state(token) == PN_ACCEPTED; } - +void SenderContext::Delivery::settle() +{ + pn_delivery_settle(token); +} void SenderContext::configure() const { configure(pn_link_target(sender)); diff --git a/cpp/src/qpid/messaging/amqp/SenderContext.h b/cpp/src/qpid/messaging/amqp/SenderContext.h index 366a3f1e79..3595379e70 100644 --- a/cpp/src/qpid/messaging/amqp/SenderContext.h +++ b/cpp/src/qpid/messaging/amqp/SenderContext.h @@ -53,6 +53,7 @@ class SenderContext void encode(const qpid::messaging::MessageImpl& message, const qpid::messaging::Address&); void send(pn_link_t*); bool accepted(); + void settle(); private: int32_t id; pn_delivery_t* token; |
