summaryrefslogtreecommitdiff
path: root/cpp/broker/src/Channel.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2006-10-11 15:50:15 +0000
committerAlan Conway <aconway@apache.org>2006-10-11 15:50:15 +0000
commit2bcadbb42a6fb2f096c1fc0a4b957d64a5024ef6 (patch)
tree886eb0659c6f28c2f1d26de7d5fd29fff0072dc5 /cpp/broker/src/Channel.cpp
parent9fc2b6c5f0848d65f1bf20e62279c055d12a1d40 (diff)
downloadqpid-python-2bcadbb42a6fb2f096c1fc0a4b957d64a5024ef6.tar.gz
Turned up gcc warnings, fixed warnings in code, enabled -Werror.
Note: #include "qpid_test_plugin.h" instead of <cppunit/TestPlugin.h> Works around warning from a cppunit macro. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@462834 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/broker/src/Channel.cpp')
-rw-r--r--cpp/broker/src/Channel.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/cpp/broker/src/Channel.cpp b/cpp/broker/src/Channel.cpp
index ed1125ee76..7bc6d599e9 100644
--- a/cpp/broker/src/Channel.cpp
+++ b/cpp/broker/src/Channel.cpp
@@ -26,16 +26,17 @@ using namespace qpid::framing;
using namespace qpid::concurrent;
-Channel::Channel(OutputHandler* _out, int _id, u_int32_t _framesize) : out(_out),
- id(_id),
- prefetchCount(0),
- prefetchSize(0),
- outstandingSize(0),
- outstandingCount(0),
- framesize(_framesize),
- transactional(false),
- deliveryTag(1),
- tagGenerator("sgen"){}
+Channel::Channel(OutputHandler* _out, int _id, u_int32_t _framesize) :
+ id(_id),
+ out(_out),
+ deliveryTag(1),
+ transactional(false),
+ prefetchSize(0),
+ prefetchCount(0),
+ outstandingSize(0),
+ outstandingCount(0),
+ framesize(_framesize),
+ tagGenerator("sgen"){}
Channel::~Channel(){
}
@@ -156,10 +157,10 @@ void Channel::handlePublish(Message* msg){
message = Message::shared_ptr(msg);
}
-void Channel::ack(u_int64_t deliveryTag, bool multiple){
+void Channel::ack(u_int64_t _deliveryTag, bool multiple){
Locker locker(deliveryLock);//need to synchronize with possible concurrent delivery
- ack_iterator i = find_if(unacknowledged.begin(), unacknowledged.end(), MatchAck(deliveryTag));
+ ack_iterator i = find_if(unacknowledged.begin(), unacknowledged.end(), MatchAck(_deliveryTag));
if(i == unacknowledged.end()){
throw InvalidAckException();
}else if(multiple){
@@ -178,8 +179,8 @@ void Channel::ack(u_int64_t deliveryTag, bool multiple){
//if the prefetch limit had previously been reached, there may
//be messages that can be now be delivered
- for(consumer_iterator i = consumers.begin(); i != consumers.end(); i++){
- i->second->requestDispatch();
+ for(consumer_iterator j = consumers.begin(); j != consumers.end(); j++){
+ j->second->requestDispatch();
}
}