Return-Path: X-Original-To: apmail-qpid-commits-archive@www.apache.org Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8D0BE1098B for ; Wed, 30 Oct 2013 17:24:50 +0000 (UTC) Received: (qmail 45023 invoked by uid 500); 30 Oct 2013 17:22:10 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 44938 invoked by uid 500); 30 Oct 2013 17:22:07 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 43929 invoked by uid 99); 30 Oct 2013 17:21:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2013 17:21:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2013 17:21:52 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A92D92388980; Wed, 30 Oct 2013 17:21:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1537187 - in /qpid/trunk/qpid/cpp/src/qpid: broker/AsyncCompletion.h broker/SemanticState.cpp broker/SessionState.cpp broker/SessionState.h ha/PrimaryTxObserver.cpp Date: Wed, 30 Oct 2013 17:21:31 -0000 To: commits@qpid.apache.org From: aconway@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131030172131.A92D92388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: aconway Date: Wed Oct 30 17:21:31 2013 New Revision: 1537187 URL: http://svn.apache.org/r1537187 Log: QPID-5139: HA correct compile error on older C++ compilers. - Added constructors for AsyncCompletion::Callback so subclasses can be copied. - Get rid of intrusive_ptr::reset Modified: qpid/trunk/qpid/cpp/src/qpid/broker/AsyncCompletion.h qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h qpid/trunk/qpid/cpp/src/qpid/ha/PrimaryTxObserver.cpp Modified: qpid/trunk/qpid/cpp/src/qpid/broker/AsyncCompletion.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/AsyncCompletion.h?rev=1537187&r1=1537186&r2=1537187&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/broker/AsyncCompletion.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/AsyncCompletion.h Wed Oct 30 17:21:31 2013 @@ -91,7 +91,13 @@ class AsyncCompletion : public virtual R */ class Callback : public RefCounted { - public: + public: + // Normally RefCounted objects cannot be copied. + // Allow Callback objects to be copied (by subclasses implementing clone()) + // The copy has an initial refcount of 0 + Callback(const Callback&) : RefCounted() {} + Callback() {} + virtual void completed(bool) = 0; virtual boost::intrusive_ptr clone() = 0; }; Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp?rev=1537187&r1=1537186&r2=1537187&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp Wed Oct 30 17:21:31 2013 @@ -221,7 +221,7 @@ void SemanticState::startDtx(const std:: if (!dtxSelected) { throw CommandInvalidException(QPID_MSG("Session has not been selected for use with dtx")); } - dtxBuffer.reset(new DtxBuffer(xid)); + dtxBuffer = new DtxBuffer(xid); txBuffer = dtxBuffer; session.getBroker().getBrokerObservers().startDtx(dtxBuffer); if (join) { @@ -242,7 +242,7 @@ void SemanticState::endDtx(const std::st } - txBuffer.reset();//ops on this session no longer transactional + txBuffer = 0;//ops on this session no longer transactional checkDtxTimeout(); if (fail) { @@ -250,7 +250,7 @@ void SemanticState::endDtx(const std::st } else { dtxBuffer->markEnded(); } - dtxBuffer.reset(); + dtxBuffer = 0; } void SemanticState::suspendDtx(const std::string& xid) @@ -259,12 +259,12 @@ void SemanticState::suspendDtx(const std throw CommandInvalidException( QPID_MSG("xid specified on start was " << dtxBuffer->getXid() << ", but " << xid << " specified on suspend")); } - txBuffer.reset();//ops on this session no longer transactional + txBuffer = 0;//ops on this session no longer transactional checkDtxTimeout(); dtxBuffer->setSuspended(true); suspendedXids[xid] = dtxBuffer; - dtxBuffer.reset(); + dtxBuffer = 0; } void SemanticState::resumeDtx(const std::string& xid) @@ -297,7 +297,7 @@ void SemanticState::resumeDtx(const std: void SemanticState::checkDtxTimeout() { if (dtxBuffer->isExpired()) { - dtxBuffer.reset(); + dtxBuffer = 0; throw DtxTimeoutException(); } } Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp?rev=1537187&r1=1537186&r2=1537187&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp Wed Oct 30 17:21:31 2013 @@ -398,7 +398,7 @@ void SessionState::IncompleteIngressMsgX session->completeCommand(id, requiresAccept, requiresSync); } } - completerContext.reset(); + completerContext = 0; } Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h?rev=1537187&r1=1537186&r2=1537187&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h Wed Oct 30 17:21:31 2013 @@ -259,10 +259,6 @@ class SessionState : public qpid::Sessio completerContext(ss.getAsyncCommandCompleter()) {} - AsyncCommandContext(const AsyncCommandContext& x) : - id(x.id), requiresSync(x.requiresSync), completerContext(x.completerContext) - {} - virtual ~AsyncCommandContext() {} protected: Modified: qpid/trunk/qpid/cpp/src/qpid/ha/PrimaryTxObserver.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/PrimaryTxObserver.cpp?rev=1537187&r1=1537186&r2=1537187&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/ha/PrimaryTxObserver.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/ha/PrimaryTxObserver.cpp Wed Oct 30 17:21:31 2013 @@ -200,7 +200,7 @@ void PrimaryTxObserver::end(sys::Mutex:: // Don't destroy the tx-queue until the transaction is complete and there // are no connected subscriptions. if (txBuffer && complete && unfinished.empty()) { - txBuffer.reset(); // Break pointer cycle. + txBuffer = 0; // Break pointer cycle. try { haBroker.getBroker().deleteQueue(txQueue->getName(), haBroker.getUserId(), string()); } catch (const std::exception& e) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org