diff options
Diffstat (limited to 'cpp/src/qpid')
| -rw-r--r-- | cpp/src/qpid/broker/SessionState.cpp | 2 | ||||
| -rw-r--r-- | cpp/src/qpid/client/SessionCore.cpp | 2 | ||||
| -rw-r--r-- | cpp/src/qpid/framing/SessionState.cpp | 4 | ||||
| -rw-r--r-- | cpp/src/qpid/framing/SessionState.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/qpid/broker/SessionState.cpp b/cpp/src/qpid/broker/SessionState.cpp index ebf02a8306..27658f2c84 100644 --- a/cpp/src/qpid/broker/SessionState.cpp +++ b/cpp/src/qpid/broker/SessionState.cpp @@ -40,7 +40,7 @@ void SessionState::handleOut(AMQFrame& f) { SessionState::SessionState( SessionManager& f, SessionHandler& h, uint32_t timeout_, uint32_t ack) - : framing::SessionState(ack), + : framing::SessionState(ack, timeout_ > 0), factory(f), handler(&h), id(true), timeout(timeout_), broker(h.getConnection().broker), version(h.getConnection().getVersion()), diff --git a/cpp/src/qpid/client/SessionCore.cpp b/cpp/src/qpid/client/SessionCore.cpp index 3a26734892..ea32622ba1 100644 --- a/cpp/src/qpid/client/SessionCore.cpp +++ b/cpp/src/qpid/client/SessionCore.cpp @@ -246,7 +246,7 @@ void SessionCore::attached(const Uuid& sessionId, if (state==OPENING) { // New session // FIXME aconway 2007-10-17: arbitrary ack value of 100 for // client, allow configuration. - session=in_place<SessionState>(100, sessionId); + session=in_place<SessionState>(100, detachedLifetime > 0, sessionId); setState(OPEN); } else { // RESUMING diff --git a/cpp/src/qpid/framing/SessionState.cpp b/cpp/src/qpid/framing/SessionState.cpp index 52b71d0cf9..f9019b036c 100644 --- a/cpp/src/qpid/framing/SessionState.cpp +++ b/cpp/src/qpid/framing/SessionState.cpp @@ -32,7 +32,7 @@ namespace qpid { namespace framing { -SessionState::SessionState(uint32_t ack, const Uuid& uuid) : +SessionState::SessionState(uint32_t ack, bool enableReplay, const Uuid& uuid) : state(ATTACHED), id(uuid), lastReceived(-1), @@ -41,7 +41,7 @@ SessionState::SessionState(uint32_t ack, const Uuid& uuid) : sendAckAt(lastReceived+ackInterval), solicitAckAt(lastSent+ackInterval), ackSolicited(false), - resumable(true) + resumable(enableReplay) {} SessionState::SessionState(const Uuid& uuid) : diff --git a/cpp/src/qpid/framing/SessionState.h b/cpp/src/qpid/framing/SessionState.h index 7a12c2ac9a..066bece003 100644 --- a/cpp/src/qpid/framing/SessionState.h +++ b/cpp/src/qpid/framing/SessionState.h @@ -61,7 +61,7 @@ class SessionState * * N=0 disables voluntary send/solict ack. */ - SessionState(uint32_t ackInterval, const framing::Uuid& id=framing::Uuid(true)); + SessionState(uint32_t ackInterval, bool enableReplay = true, const framing::Uuid& id=framing::Uuid(true)); /** * Create a non-resumable session. Does not store session frames, |
