X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocolServerSocketHandle.cti;h=26c2b696551c22789436a927251eb4b0d839201c;hb=d5a72d0b3f6fee56dba6de1c54cafb448ebe3457;hp=85ce2006a6291b224b281349f412e6bb6dc6b940;hpb=66293acca094b2f29e26e70208691db4af274efb;p=senf.git diff --git a/Socket/ProtocolServerSocketHandle.cti b/Socket/ProtocolServerSocketHandle.cti index 85ce200..26c2b69 100644 --- a/Socket/ProtocolServerSocketHandle.cti +++ b/Socket/ProtocolServerSocketHandle.cti @@ -1,8 +1,8 @@ // $Id$ // // Copyright (C) 2006 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -43,20 +43,20 @@ ProtocolServerSocketHandle(senf::NoInit_t) template prefix_ senf::ProtocolServerSocketHandle::ProtocolServerSocketHandle() : ServerSocketHandle( - std::auto_ptr(new SocketProtocol())) + std::auto_ptr(new ProtocolSocketBody(true))) {} #define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 9, SENF_ABSOLUTE_INCLUDE_PATH(Socket/ProtocolServerSocketHandle.mpp), 2)) #include BOOST_PP_ITERATE() template -prefix_ SocketProtocol const & +prefix_ SocketProtocol & senf::ProtocolServerSocketHandle::protocol() { SENF_ASSERT( dynamic_cast(&this->body().protocol()) ); // Need dynamic_cast here, since senf::SocketProtocol is a // virtual base - return dynamic_cast(this->body().protocol()); + return dynamic_cast(this->body().protocol()); } template @@ -91,7 +91,11 @@ senf::ProtocolServerSocketHandle::state(SocketStateMap & map, unsigned lod) { map["handle"] = prettyName(typeid(*this)); - this->body().state(map,lod); + if (this->valid()) { + map["valid"] << "true"; + this->body().state(map,lod); + } else + map["valid"] << "false"; } template