summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-09-12 10:05:46 +0000
committerGordon Sim <gsim@apache.org>2007-09-12 10:05:46 +0000
commitf9313dcc457a602a26f5f4747d5af104a56252a1 (patch)
treefe679e4924eea7607b92162e18bb2384e45ba48c
parent848e4f986179e3c58d23a7e6558f0d3fc0d71373 (diff)
downloadqpid-python-f9313dcc457a602a26f5f4747d5af104a56252a1.tar.gz
Applied rev 573516 from M2.1: Fixes for QPID-581 & QPID-563
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@574876 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--cpp/lib/broker/SessionHandlerImpl.cpp2
-rw-r--r--cpp/lib/client/ClientChannel.cpp6
-rw-r--r--cpp/lib/common/sys/apr/APRSocket.cpp1
-rw-r--r--cpp/lib/common/sys/apr/LFSessionContext.cpp2
4 files changed, 4 insertions, 7 deletions
diff --git a/cpp/lib/broker/SessionHandlerImpl.cpp b/cpp/lib/broker/SessionHandlerImpl.cpp
index 0bea721175..b23432e29d 100644
--- a/cpp/lib/broker/SessionHandlerImpl.cpp
+++ b/cpp/lib/broker/SessionHandlerImpl.cpp
@@ -138,8 +138,6 @@ void SessionHandlerImpl::initiated(qpid::framing::ProtocolInitiation* header){
client = new qpid::framing::AMQP_ClientProxy(context, header->getMajor(), header->getMinor());
- std::cout << "---------------" << this << std::endl;
-
//send connection start
FieldTable properties;
string mechanisms("PLAIN");
diff --git a/cpp/lib/client/ClientChannel.cpp b/cpp/lib/client/ClientChannel.cpp
index 4ec0d87eeb..a97d79dcf9 100644
--- a/cpp/lib/client/ClientChannel.cpp
+++ b/cpp/lib/client/ClientChannel.cpp
@@ -258,9 +258,7 @@ void Channel::rollback(){
void Channel::handleMethod(AMQMethodBody::shared_ptr body){
//channel.flow, channel.close, basic.deliver, basic.return or a response to a synchronous request
- if(responses.isWaiting()){
- responses.signalResponse(body);
- }else if(method_bodies.basic_deliver.match(body.get())){
+ if(method_bodies.basic_deliver.match(body.get())){
if(incoming != 0){
std::cout << "Existing message not complete [deliveryTag=" << incoming->getDeliveryTag() << "]" << std::endl;
THROW_QPID_ERROR(PROTOCOL_ERROR + 504, "Existing message not complete");
@@ -280,6 +278,8 @@ void Channel::handleMethod(AMQMethodBody::shared_ptr body){
}else if(method_bodies.channel_flow.match(body.get())){
+ } else if(responses.isWaiting()){
+ responses.signalResponse(body);
}else{
//signal error
std::cout << "Unhandled method: " << *body << std::endl;
diff --git a/cpp/lib/common/sys/apr/APRSocket.cpp b/cpp/lib/common/sys/apr/APRSocket.cpp
index 4917803370..f68d51d8e4 100644
--- a/cpp/lib/common/sys/apr/APRSocket.cpp
+++ b/cpp/lib/common/sys/apr/APRSocket.cpp
@@ -53,7 +53,6 @@ void APRSocket::write(qpid::framing::Buffer& buffer){
void APRSocket::close(){
if(!closed){
- std::cout << "Closing socket " << socket << "@" << this << std::endl;
CHECK_APR_SUCCESS(apr_socket_close(socket));
closed = true;
}
diff --git a/cpp/lib/common/sys/apr/LFSessionContext.cpp b/cpp/lib/common/sys/apr/LFSessionContext.cpp
index a06b7537ee..8a7ce18136 100644
--- a/cpp/lib/common/sys/apr/LFSessionContext.cpp
+++ b/cpp/lib/common/sys/apr/LFSessionContext.cpp
@@ -158,7 +158,7 @@ void LFSessionContext::close(){
void LFSessionContext::handleClose(){
handler->closed();
APRPool::free(fd.p);
- std::cout << "Session closed [" << &socket << "]" << std::endl;
+ if (debug) std::cout << "Session closed [" << &socket << "]" << std::endl;
delete handler;
delete this;
}