From d965a29414762f0b3bbc840485f6327c3d523946 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 16 Nov 2006 14:43:29 +0000 Subject: Minor modifications for recovery and debug. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@475753 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/Queue.cpp | 8 ++++---- cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp | 6 ++---- cpp/src/qpid/broker/SessionHandlerFactoryImpl.h | 1 - cpp/src/qpid/framing/AMQHeaderBody.cpp | 9 ++++++--- cpp/src/qpid/framing/FieldTable.cpp | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp index 29a7e3a6c8..1150d055cb 100644 --- a/cpp/src/qpid/broker/Queue.cpp +++ b/cpp/src/qpid/broker/Queue.cpp @@ -175,28 +175,28 @@ bool Queue::canAutoDelete() const{ void Queue::enqueue(TransactionContext* ctxt, Message::shared_ptr& msg, const string * const xid) { - if(msg->isPersistent() && store){ + if (msg->isPersistent() && store) { store->enqueue(ctxt, msg, *this, xid); } } void Queue::dequeue(TransactionContext* ctxt, Message::shared_ptr& msg, const string * const xid) { - if(msg->isPersistent() && store){ + if (msg->isPersistent() && store) { store->dequeue(ctxt, msg, *this, xid); } } void Queue::create() { - if(store){ + if (store) { store->create(*this); } } void Queue::destroy() { - if(store){ + if (store) { store->destroy(*this); } } diff --git a/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp b/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp index 5b7bb1ff5e..57fff37653 100644 --- a/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp +++ b/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp @@ -48,12 +48,10 @@ SessionHandlerFactoryImpl::SessionHandlerFactoryImpl(const std::string& _store, exchanges.declare(amq_topic, TopicExchange::typeName); exchanges.declare(amq_fanout, FanOutExchange::typeName); exchanges.declare(amq_match, HeadersExchange::typeName); - cleaner.start(); -} -void SessionHandlerFactoryImpl::recover() -{ if(store.get()) store->recover(queues); + + cleaner.start(); } SessionHandler* SessionHandlerFactoryImpl::create(SessionContext* ctxt) diff --git a/cpp/src/qpid/broker/SessionHandlerFactoryImpl.h b/cpp/src/qpid/broker/SessionHandlerFactoryImpl.h index 3703efcf89..fb7462ac8b 100644 --- a/cpp/src/qpid/broker/SessionHandlerFactoryImpl.h +++ b/cpp/src/qpid/broker/SessionHandlerFactoryImpl.h @@ -45,7 +45,6 @@ namespace qpid { AutoDelete cleaner; public: SessionHandlerFactoryImpl(const std::string& store = "", u_int32_t timeout = 30000); - void recover(); virtual qpid::sys::SessionHandler* create(qpid::sys::SessionContext* ctxt); virtual ~SessionHandlerFactoryImpl(); }; diff --git a/cpp/src/qpid/framing/AMQHeaderBody.cpp b/cpp/src/qpid/framing/AMQHeaderBody.cpp index fea85256ab..5746abfab5 100644 --- a/cpp/src/qpid/framing/AMQHeaderBody.cpp +++ b/cpp/src/qpid/framing/AMQHeaderBody.cpp @@ -64,9 +64,12 @@ void qpid::framing::AMQHeaderBody::createProperties(int classId){ void qpid::framing::AMQHeaderBody::print(std::ostream& out) const { - out << "header, content_size=" << getContentSize() - << " (" << size() << " bytes)" << ", headers=" ; + out << "header (" << size() << " bytes)" << " content_size=" << getContentSize(); const BasicHeaderProperties* props = dynamic_cast(getProperties()); - if (props) out << const_cast(props)->getHeaders(); + if (props) { + out << ", message_id=" << props->getMessageId(); + out << ", delivery_mode=" << (int) props->getDeliveryMode(); + out << ", headers=" << const_cast(props)->getHeaders(); + } } diff --git a/cpp/src/qpid/framing/FieldTable.cpp b/cpp/src/qpid/framing/FieldTable.cpp index fd0f6fedfd..1c24ca3aff 100644 --- a/cpp/src/qpid/framing/FieldTable.cpp +++ b/cpp/src/qpid/framing/FieldTable.cpp @@ -50,7 +50,7 @@ std::ostream& operator<<(std::ostream& out, const FieldTable::ValueMap::value_ty } std::ostream& operator<<(std::ostream& out, const FieldTable& t) { - out << "field_table{"; + out << "{"; FieldTable::ValueMap::const_iterator i = t.getMap().begin(); if (i != t.getMap().end()) out << *i++; while (i != t.getMap().end()) -- cgit v1.2.1