diff options
author | aconway <aconway@unknown> | 2015-03-05 22:32:00 +0000 |
---|---|---|
committer | aconway <aconway@unknown> | 2015-03-05 22:32:00 +0000 |
commit | 70ee30d900ab5df4631c082c24ddf3cfddc67a97 (patch) | |
tree | 788ffcc5cde259136bb2fab6a0ef6f987b0acf8a | |
parent | 7fc4b15721a31af5bf064c8acd1f2c092603292b (diff) | |
download | qpid-python-70ee30d900ab5df4631c082c24ddf3cfddc67a97.tar.gz |
QPID-6427: Problem building trunk qpid cpp on RHEL 5
Fixed a couple of legitimate compiler warnings, worked around a couple of compiler weaknesses.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1664517 13f79535-47bb-0310-9956-ffa450edef68
4 files changed, 6 insertions, 6 deletions
diff --git a/qpid/cpp/src/qpid/broker/amqp/Session.cpp b/qpid/cpp/src/qpid/broker/amqp/Session.cpp index 3b65e6a64d..9cd6aae26f 100644 --- a/qpid/cpp/src/qpid/broker/amqp/Session.cpp +++ b/qpid/cpp/src/qpid/broker/amqp/Session.cpp @@ -835,7 +835,7 @@ void Session::abort() tx.dischargeComplete(); tx.buffer->rollback(); txAborted(); - tx.buffer.reset(); + tx.buffer = boost::intrusive_ptr<TxBuffer>(); QPID_LOG(debug, "Transaction " << tx.id << " rolled back"); } } @@ -848,7 +848,7 @@ void Session::committed(bool sync) if (tx.buffer.get()) { tx.buffer->endCommit(&connection.getBroker().getStore()); txCommitted(); - tx.buffer.reset(); + tx.buffer = boost::intrusive_ptr<TxBuffer>(); QPID_LOG(debug, "Transaction " << tx.id << " comitted"); } else { throw Exception(qpid::amqp::error_conditions::transaction::ROLLBACK, "tranaction vanished during async commit"); diff --git a/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp b/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp index d4a7b60e3c..0c516311da 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp +++ b/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp @@ -230,7 +230,7 @@ void ConnectionContext::close() } if (ticker) { ticker->cancel(); - ticker.reset(); + ticker = boost::intrusive_ptr<qpid::sys::TimerTask>(); } } @@ -1236,7 +1236,7 @@ void ConnectionContext::startTxSession(boost::shared_ptr<SessionContext> session QPID_LOG(debug, id << " attaching transaction for " << session->getName()); boost::shared_ptr<Transaction> tx(new Transaction(session->session)); session->transaction = tx; - attach(session, tx); + attach(session, boost::shared_ptr<SenderContext>(tx)); tx->declare(boost::bind(&ConnectionContext::send, this, _1, _2, _3, _4, _5), session); } catch (const Exception& e) { throw TransactionError(Msg() << "Cannot start transaction: " << e.what()); diff --git a/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h b/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h index 2b4e8e1986..dd1352aecb 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h +++ b/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h @@ -46,7 +46,7 @@ class ReceiverContext { public: ReceiverContext(pn_session_t* session, const std::string& name, const qpid::messaging::Address& source); - ~ReceiverContext(); + virtual ~ReceiverContext(); void reset(pn_session_t* session); void setCapacity(uint32_t); uint32_t getCapacity(); diff --git a/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h b/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h index 4d3c4bee79..467a8e0d3d 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h +++ b/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h @@ -76,7 +76,7 @@ class SenderContext const qpid::messaging::Address& target, bool setToOnSend, const CoordinatorPtr& transaction = CoordinatorPtr()); - ~SenderContext(); + virtual ~SenderContext(); virtual void reset(pn_session_t* session); virtual void close(); |