summaryrefslogtreecommitdiff
path: root/cpp/common/io/src/LFSessionContext.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/common/io/src/LFSessionContext.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/common/io/src/LFSessionContext.cpp')
-rw-r--r--cpp/common/io/src/LFSessionContext.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/cpp/common/io/src/LFSessionContext.cpp b/cpp/common/io/src/LFSessionContext.cpp
index d786cb5e98..7b8208f704 100644
--- a/cpp/common/io/src/LFSessionContext.cpp
+++ b/cpp/common/io/src/LFSessionContext.cpp
@@ -26,17 +26,19 @@ using namespace qpid::framing;
LFSessionContext::LFSessionContext(apr_pool_t* _pool, apr_socket_t* _socket,
LFProcessor* const _processor,
- bool _debug) : socket(_socket),
- processor(_processor),
- initiated(false),
- processing(false),
- closing(false),
- in(32768),
- out(32768),
- reading(0),
- writing(0),
- debug(_debug){
-
+ bool _debug) :
+ debug(_debug),
+ socket(_socket),
+ initiated(false),
+ in(32768),
+ out(32768),
+ processor(_processor),
+ processing(false),
+ closing(false),
+ reading(0),
+ writing(0)
+{
+
fd.p = _pool;
fd.desc_type = APR_POLL_SOCKET;
fd.reqevents = APR_POLLIN;
@@ -63,9 +65,9 @@ void LFSessionContext::read(){
handler->received(&frame);
}
}else{
- ProtocolInitiation init;
- if(init.decode(in)){
- handler->initiated(&init);
+ ProtocolInitiation protocolInit;
+ if(protocolInit.decode(in)){
+ handler->initiated(&protocolInit);
initiated = true;
if(debug) std::cout << "INIT [" << &socket << "]" << std::endl;
}
@@ -173,8 +175,8 @@ void LFSessionContext::shutdown(){
handleClose();
}
-void LFSessionContext::init(SessionHandler* handler){
- this->handler = handler;
+void LFSessionContext::init(SessionHandler* _handler){
+ handler = _handler;
processor->add(&fd);
}