diff options
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp | 1 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/messaging/amqp/SessionContext.cpp | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp b/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp index 586c8a87d6..9d9f186f5c 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp +++ b/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp @@ -307,7 +307,6 @@ bool ConnectionContext::get(boost::shared_ptr<SessionContext> ssn, boost::shared encoded->init(impl); impl.setEncoded(encoded); impl.setInternalId(ssn->record(current)); - pn_link_advance(lnk->receiver); if (lnk->capacity) { pn_link_flow(lnk->receiver, 1); if (lnk->wakeupToIssueCredit()) { diff --git a/qpid/cpp/src/qpid/messaging/amqp/SessionContext.cpp b/qpid/cpp/src/qpid/messaging/amqp/SessionContext.cpp index 2b82ffc377..92bdea7dbc 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/SessionContext.cpp +++ b/qpid/cpp/src/qpid/messaging/amqp/SessionContext.cpp @@ -134,9 +134,13 @@ qpid::framing::SequenceNumber SessionContext::record(pn_delivery_t* delivery) { error.raise(); qpid::framing::SequenceNumber id = next++; - if (!pn_delivery_settled(delivery)) + if (!pn_delivery_settled(delivery)) { unacked[id] = delivery; - QPID_LOG(debug, "Recorded delivery " << id << " -> " << delivery); + QPID_LOG(debug, "Recorded delivery " << id << " -> " << delivery); + pn_link_advance(pn_delivery_link(delivery)); + } else { + pn_delivery_settle(delivery); // Automatically advances the link. + } return id; } |
