diff options
| author | Alan Conway <aconway@apache.org> | 2007-10-29 21:14:44 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-10-29 21:14:44 +0000 |
| commit | da6e2b9f62966ef7d0cb69f58ffe1365af98d676 (patch) | |
| tree | a46b84d820f2c26f6094f092e18a0937deb46ecf /cpp/src/qpid/client/Channel.cpp | |
| parent | 505c43651b302ecf773bff1fcf3d45f5a1aef682 (diff) | |
| download | qpid-python-da6e2b9f62966ef7d0cb69f58ffe1365af98d676.tar.gz | |
client/BlockingQueue.h, sys/ConcurrentQueue.h: merged to sys/BlockingQueue.h
- updated all users
qpid/Exception.h: Removed unimplemented clone() function.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@589857 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/Channel.cpp')
| -rw-r--r-- | cpp/src/qpid/client/Channel.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cpp/src/qpid/client/Channel.cpp b/cpp/src/qpid/client/Channel.cpp index 8b7b7e1118..fbb2e0c6f8 100644 --- a/cpp/src/qpid/client/Channel.cpp +++ b/cpp/src/qpid/client/Channel.cpp @@ -187,13 +187,14 @@ bool Channel::get(Message& msg, const Queue& _queue, AckMode ackMode) { status.sync(); session.messageCancel(tag); - if (incoming.empty()) { - return false; - } else { - msg.populate(*(incoming.pop())); + FrameSet::shared_ptr p; + if (incoming.tryPop(p)) { + msg.populate(*p); if (ackMode == AUTO_ACK) msg.acknowledge(session, false, true); return true; } + else + return false; } void Channel::publish(Message& msg, const Exchange& exchange, @@ -263,7 +264,7 @@ void Channel::run() { QPID_LOG(warning, "Dropping unsupported message type: " << content->getMethod()); } } - } catch (const QueueClosed&) {} + } catch (const sys::QueueClosed&) {} } }} |
