diff --git a/src/RADIUS_Destination.h b/src/RADIUS_Destination.h index c2b2602f..64f44442 100644 --- a/src/RADIUS_Destination.h +++ b/src/RADIUS_Destination.h @@ -522,7 +522,19 @@ namespace OpenWifi { MicroServiceConfigGetInt("radius.proxy.coa.port", DEFAULT_RADIUS_CoA_PORT)); CoASocketV4_ = std::make_unique(CoASockAddrV4, true, true); + Reactor_.addEventHandler( + *AuthenticationSocketV4_, + Poco::NObserver( + *this, &RADIUS_Destination::OnAuthenticationSocketReadable)); + Reactor_.addEventHandler( + *AccountingSocketV4_, + Poco::NObserver( + *this, &RADIUS_Destination::OnAccountingSocketReadable)); + Reactor_.addEventHandler( + *CoASocketV4_, Poco::NObserver( + *this, &RADIUS_Destination::OnCoASocketReadable)); +/* Poco::Net::SocketAddress AuthSockAddrV6( Poco::Net::AddressFamily::IPv6, MicroServiceConfigGetInt("radius.proxy.authentication.port", @@ -542,18 +554,6 @@ namespace OpenWifi { MicroServiceConfigGetInt("radius.proxy.coa.port", DEFAULT_RADIUS_CoA_PORT)); CoASocketV6_ = std::make_unique(CoASockAddrV6, true, true); - Reactor_.addEventHandler( - *AuthenticationSocketV4_, - Poco::NObserver( - *this, &RADIUS_Destination::OnAuthenticationSocketReadable)); - Reactor_.addEventHandler( - *AccountingSocketV4_, - Poco::NObserver( - *this, &RADIUS_Destination::OnAccountingSocketReadable)); - Reactor_.addEventHandler( - *CoASocketV4_, Poco::NObserver( - *this, &RADIUS_Destination::OnCoASocketReadable)); - Reactor_.addEventHandler( *AuthenticationSocketV6_, Poco::NObserver( @@ -566,6 +566,7 @@ namespace OpenWifi { Reactor_.addEventHandler( *CoASocketV6_, Poco::NObserver( *this, &RADIUS_Destination::OnCoASocketReadable)); +*/ Connected_ = true; } return true; @@ -620,7 +621,8 @@ namespace OpenWifi { CoASocketV4_.reset(); } - if(AuthenticationSocketV6_) { +/* + if(AuthenticationSocketV6_) { Reactor_.removeEventHandler( *AuthenticationSocketV6_, Poco::NObserver( @@ -646,7 +648,7 @@ namespace OpenWifi { CoASocketV6_->close(); CoASocketV6_.reset(); } - +*/ } else { if(Socket_!=nullptr) { Reactor_.removeEventHandler( @@ -726,9 +728,11 @@ namespace OpenWifi { std::unique_ptr AuthenticationSocketV4_; std::unique_ptr CoASocketV4_; - std::unique_ptr CoASocketV6_; +/* + std::unique_ptr CoASocketV6_; std::unique_ptr AccountingSocketV6_; std::unique_ptr AuthenticationSocketV6_; +*/ Poco::Thread ReconnectThread_; std::unique_ptr Peer_Cert_;