rsked/inetcheck.cc
/// Retrieve the enable switch, status path and update interval
/// from the Config object.
/// * May throw Config exception
///
Retrieve the enable switch, status path and update interval
from the Config object.
May throw Config exception
Retrieve the enable switch status path and update interval from the Config object . May throw Config exception
void Inet_checker::configure(Config &cfg)
{
    cfg.get_bool("Inet_checker","enabled",m_enabled);
    if (not m_enabled) {
        LOG_WARNING(Lgr) << "Inet_checker will be disabled per configuration";
    }
    long rt = m_refresh_secs;
    if (cfg.get_long("Inet_checker","refresh",rt)) {
        if (rt >= 0) {
            m_refresh_secs = rt;
        }
    }
    cfg.get_pathname("Inet_checker","status_path",
                     FileCond::NA, m_status_path);
}
void Inet_checker :: configure ( Config & cfg ) { cfg . get_bool ( " " , " " , m_enabled ) ; if ( not m_enabled ) { LOG_WARNING ( Lgr ) << " " ; } long rt = m_refresh_secs ; if ( cfg . get_long ( " " , " " , rt ) ) { if ( rt >= 0 ) { m_refresh_secs = rt ; } } cfg . get_pathname ( " " , " " , FileCond :: NA , m_status_path ) ; }
Retrieve the enable switch, status path and update interval
from the Config object.
Retrieve the enable switch status path and update interval from the Config object .
// check if enabled // establish refresh interval