diff options
| author | Alan Conway <aconway@apache.org> | 2009-06-18 21:25:00 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-06-18 21:25:00 +0000 |
| commit | fdb23707352b96986daf36db3b47538a307a2888 (patch) | |
| tree | ba4f703fb4741e769e1a5c90ba3d363502961181 /cpp/src/qpid/cluster/Connection.cpp | |
| parent | d3ba25a6c0ad0b8bce0482694152bcaed206af7b (diff) | |
| download | qpid-python-fdb23707352b96986daf36db3b47538a307a2888.tar.gz | |
Make error-check a cluster-connection control rather than a cluster control.
Fixes bug if an error occurs during update. As cluster controls, error-checks
were being processed out of sequence with the connection data they referred to.
Making them connection controls ensures they are processed in the proper order.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@786294 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Connection.cpp')
| -rw-r--r-- | cpp/src/qpid/cluster/Connection.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index 2db8879eb5..42cb9556fb 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -38,6 +38,7 @@ #include "qpid/framing/ClusterConnectionDeliverCloseBody.h" #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" +#include "qpid/framing/ClusterConnectionErrorCheckBody.h" #include "qpid/log/Statement.h" #include <boost/current_function.hpp> @@ -54,7 +55,7 @@ namespace qpid { namespace cluster { using namespace framing; -using namespace framing::cluster; +using namespace framing::cluster_connection; qpid::sys::AtomicValue<uint64_t> Connection::catchUpId(0x5000000000000000LL); @@ -444,5 +445,19 @@ void Connection::connectionError(const std::string& ) { cluster.flagError(*this, ERROR_TYPE_CONNECTION); } +void Connection::errorCheck(uint8_t type, uint64_t frameSeq) { + // If we handle an errorCheck at this point (rather than in the + // ErrorCheck class) then we have processed succesfully past the + // point of the error so respond with ERROR_TYPE_NONE + if (type != ERROR_TYPE_NONE) { // Don't respond to NONE. + QPID_LOG(debug, cluster << " error " << frameSeq << " on " << *this + << " did not occur locally."); + cluster.getMulticast().mcastControl( + ClusterConnectionErrorCheckBody( + ProtocolVersion(), ERROR_TYPE_NONE, frameSeq), self); + } +} + + }} // namespace qpid::cluster |
