diff options
author | Alan Conway <aconway@apache.org> | 2012-01-25 18:47:47 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2012-01-25 18:47:47 +0000 |
commit | 41be211a5ed3cffedac0a72c6e49172a97999061 (patch) | |
tree | 60f885b981923a0a352fd1a2874ff02ae12d1286 | |
parent | 4dfa77ffe7995d75e080b7457dcddf36fea4260d (diff) | |
download | qpid-python-41be211a5ed3cffedac0a72c6e49172a97999061.tar.gz |
Revert "QPID-3352: Fix test for failed session to avoid confusion with as yet uninitialised session"
This reverts commit r1233083. It caused a test failure
run_federation_tests: federation.FederationTests.test_pull_from_queue_recovery
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-3603-2@1235866 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp | 6 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/amqp_0_10/SessionHandler.h | 4 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/Bridge.cpp | 5 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/Bridge.h | 2 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/Link.cpp | 2 |
5 files changed, 7 insertions, 12 deletions
diff --git a/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp b/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp index e60b7739d8..5eedafc77b 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp +++ b/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp @@ -42,7 +42,7 @@ void SessionHandler::checkAttached() { SessionHandler::SessionHandler(FrameHandler* out, ChannelId ch) : channel(ch, out), peer(channel), awaitingDetached(false), - sendReady(), receiveReady(), hasFailed(false) {} + sendReady(), receiveReady() {} SessionHandler::~SessionHandler() {} @@ -192,7 +192,6 @@ void SessionHandler::detached(const std::string& /*name*/, uint8_t code) { awaitingDetached = false; if (code != session::DETACH_CODE_NORMAL) { sendReady = receiveReady = false; - hasFailed = true; channelException(convert(code), "session.detached from peer."); } else { handleDetach(); @@ -331,9 +330,6 @@ void SessionHandler::sendFlush() { bool SessionHandler::ready() const { return sendReady && receiveReady; } -bool SessionHandler::failed() const { - return hasFailed; -} }} // namespace qpid::broker diff --git a/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.h b/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.h index d0e10b9908..8b072fa05c 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.h +++ b/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.h @@ -67,8 +67,6 @@ class QPID_COMMON_CLASS_EXTERN SessionHandler : public framing::AMQP_AllOperatio /** True if the handler is ready to send and receive */ QPID_COMMON_EXTERN bool ready() const; - /** True if the session has failed with an execution exception */ - QPID_COMMON_EXTERN bool failed() const; // Protocol methods QPID_COMMON_EXTERN void attach(const std::string& name, bool force); @@ -113,7 +111,7 @@ class QPID_COMMON_CLASS_EXTERN SessionHandler : public framing::AMQP_AllOperatio framing::AMQP_AllProxy::Session peer; std::string name; bool awaitingDetached; - bool sendReady, receiveReady, hasFailed; + bool sendReady, receiveReady; }; }} // namespace qpid::amqp_0_10 diff --git a/qpid/cpp/src/qpid/broker/Bridge.cpp b/qpid/cpp/src/qpid/broker/Bridge.cpp index 558507b3b7..0ca82530ab 100644 --- a/qpid/cpp/src/qpid/broker/Bridge.cpp +++ b/qpid/cpp/src/qpid/broker/Bridge.cpp @@ -179,9 +179,10 @@ void Bridge::destroy() listener(this); } -bool Bridge::hasSessionFailed() const +bool Bridge::isSessionReady() const { - return conn->getChannel(id).failed(); + SessionHandler& sessionHandler = conn->getChannel(id); + return sessionHandler.ready(); } void Bridge::setPersistenceId(uint64_t pId) const diff --git a/qpid/cpp/src/qpid/broker/Bridge.h b/qpid/cpp/src/qpid/broker/Bridge.h index c8df0c170a..b849b11ba8 100644 --- a/qpid/cpp/src/qpid/broker/Bridge.h +++ b/qpid/cpp/src/qpid/broker/Bridge.h @@ -63,7 +63,7 @@ public: void destroy(); bool isDurable() { return args.i_durable; } - bool hasSessionFailed() const; + bool isSessionReady() const; management::ManagementObject* GetManagementObject() const; management::Manageable::status_t ManagementMethod(uint32_t methodId, diff --git a/qpid/cpp/src/qpid/broker/Link.cpp b/qpid/cpp/src/qpid/broker/Link.cpp index 314b97daf1..b2c4bbdec2 100644 --- a/qpid/cpp/src/qpid/broker/Link.cpp +++ b/qpid/cpp/src/qpid/broker/Link.cpp @@ -255,7 +255,7 @@ void Link::ioThreadProcessing() // check for bridge session errors and recover if (!active.empty()) { Bridges::iterator removed = std::remove_if( - active.begin(), active.end(), boost::bind(&Bridge::hasSessionFailed, _1)); + active.begin(), active.end(), !boost::bind(&Bridge::isSessionReady, _1)); for (Bridges::iterator i = removed; i != active.end(); ++i) { Bridge::shared_ptr bridge = *i; bridge->closed(); |