diff options
| author | Alan Conway <aconway@apache.org> | 2006-10-11 15:50:15 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2006-10-11 15:50:15 +0000 |
| commit | ac3335857e3b30b99240c2a7638c8aed31d3e78d (patch) | |
| tree | 144465ed3ea20dab341a972377de9c0451b71113 /qpid/cpp/common/io/src/LFSessionContext.cpp | |
| parent | a3d3d2ccc0ccb5d4b857be93c4774ac1bddd0aeb (diff) | |
| download | qpid-python-ac3335857e3b30b99240c2a7638c8aed31d3e78d.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@462834 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/common/io/src/LFSessionContext.cpp')
| -rw-r--r-- | qpid/cpp/common/io/src/LFSessionContext.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/qpid/cpp/common/io/src/LFSessionContext.cpp b/qpid/cpp/common/io/src/LFSessionContext.cpp index d786cb5e98..7b8208f704 100644 --- a/qpid/cpp/common/io/src/LFSessionContext.cpp +++ b/qpid/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); } |
