From 604b624676c20770d6b6b30be3b2fb357892982e Mon Sep 17 00:00:00 2001 From: "Carl C. Trieloff" Date: Mon, 13 Oct 2008 18:07:07 +0000 Subject: QPID-1351 -Support for sequencing messages through an exchange -Related changes - Bug fix for ptr saftey in Headers & FanOut exchange - Added support for int64 and uint64 in fieldvalue / fieldtable - Added tests for fieldtable - Added tests for sequencing message feature. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@704192 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/FanOutExchange.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'cpp/src/qpid/broker/FanOutExchange.cpp') diff --git a/cpp/src/qpid/broker/FanOutExchange.cpp b/cpp/src/qpid/broker/FanOutExchange.cpp index 1e03d34b25..42fe537c6a 100644 --- a/cpp/src/qpid/broker/FanOutExchange.cpp +++ b/cpp/src/qpid/broker/FanOutExchange.cpp @@ -69,15 +69,18 @@ bool FanOutExchange::unbind(Queue::shared_ptr queue, const string& /*key*/, cons } void FanOutExchange::route(Deliverable& msg, const string& /*routingKey*/, const FieldTable* /*args*/){ + preRoute(msg); uint32_t count(0); BindingsArray::ConstPtr p = bindings.snapshot(); - for(std::vector::const_iterator i = p->begin(); i != p->end(); ++i, count++){ - msg.deliverTo((*i)->queue); - if ((*i)->mgmtBinding != 0) - (*i)->mgmtBinding->inc_msgMatched (); + if (p.get()){ + for(std::vector::const_iterator i = p->begin(); i != p->end(); ++i, count++){ + msg.deliverTo((*i)->queue); + if ((*i)->mgmtBinding != 0) + (*i)->mgmtBinding->inc_msgMatched (); + } } - + if (mgmtExchange != 0) { mgmtExchange->inc_msgReceives (); -- cgit v1.2.1