From 04fb4fdba88145a473b9a3a56ac6fd531af89af2 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 28 Nov 2007 20:17:55 +0000 Subject: Add unit_test.h to distribution. Updated/removed sundry FIXME comments. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@599128 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/Dispatcher.cpp | 17 ++++------------- cpp/src/qpid/client/SessionCore.cpp | 9 +++++---- 2 files changed, 9 insertions(+), 17 deletions(-) (limited to 'cpp/src/qpid/client') diff --git a/cpp/src/qpid/client/Dispatcher.cpp b/cpp/src/qpid/client/Dispatcher.cpp index fd6a18b349..37fada45fb 100644 --- a/cpp/src/qpid/client/Dispatcher.cpp +++ b/cpp/src/qpid/client/Dispatcher.cpp @@ -75,20 +75,11 @@ void Dispatcher::run() if (content->isA()) { Message msg(*content, session); Subscriber::shared_ptr listener = find(msg.getDestination()); - if (!listener) { - // FIXME aconway 2007-11-07: Should close session & throw here? - QPID_LOG(error, "No message listener for " - << content->getMethod()); - } else { - listener->received(msg); - } + assert(listener); + listener->received(msg); } else { - if (handler.get()) { - handler->handle(*content); - } else { - // FIXME aconway 2007-11-07: Should close session & throw here? - QPID_LOG(error, "Unhandled method: " << content->getMethod()); - } + assert (handler.get()); + handler->handle(*content); } } } diff --git a/cpp/src/qpid/client/SessionCore.cpp b/cpp/src/qpid/client/SessionCore.cpp index ea32622ba1..3f042bc13a 100644 --- a/cpp/src/qpid/client/SessionCore.cpp +++ b/cpp/src/qpid/client/SessionCore.cpp @@ -211,7 +211,7 @@ void SessionCore::resume(shared_ptr c) { proxy.resume(getId()); waitFor(OPEN); proxy.ack(sendAck, SequenceNumberSet()); - // FIXME aconway 2007-10-23: Replay inside the lock might be a prolem + // TODO aconway 2007-10-23: Replay inside the lock might be a prolem // for large replay sets. SessionState::Replay replay=session->replay(); for (SessionState::Replay::iterator i = replay.begin(); @@ -244,9 +244,10 @@ void SessionCore::attached(const Uuid& sessionId, check(state == OPENING || state == RESUMING, COMMAND_INVALID, UNEXPECTED_SESSION_ATTACHED); if (state==OPENING) { // New session - // FIXME aconway 2007-10-17: arbitrary ack value of 100 for - // client, allow configuration. - session=in_place(100, detachedLifetime > 0, sessionId); + // TODO aconway 2007-10-17: 0 disables sesskon.ack for now. + // If AMQP WG decides to keep it, we need to add configuration + // for the ack rate. + session=in_place(0, detachedLifetime > 0, sessionId); setState(OPEN); } else { // RESUMING -- cgit v1.2.1