Cosmetic - changed the level and options to disable the module.

git-svn-id: http://voip.null.ro/svn/yate@717 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2006-03-22 22:53:11 +00:00
parent 496179c49e
commit d725979a4c
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,9 @@
[general]
; set global parameters of the RADIUS client
; enabled: bool: Enable the RADIUS module
;enabled=true
; addr: ipaddress: IP address to bind to - must be set to enable, 0.0.0.0 is OK
;addr=

View File

@ -1356,14 +1356,14 @@ void RadiusModule::initialize()
s_pb_parallel = s_cfg.getBoolValue("portabill","parallel",false);
s_pb_simplify = s_cfg.getBoolValue("portabill","simplify",false);
if (m_init)
if (m_init || !s_cfg.getBoolValue("general","enabled",true))
return;
s_localAddr.host(s_cfg.getValue("general","addr"));
s_localAddr.port(s_cfg.getIntValue("general","port",1810));
if (!(s_localAddr.valid() && s_localAddr.host() && s_localAddr.port())) {
Debug(this,DebugWarn,"Invalid address %s:%d. Radius functions unavailable",
Debug(this,DebugNote,"Invalid address %s:%d. Radius functions unavailable",
s_localAddr.host().c_str(),s_localAddr.port());
return;
}