rsked/inetcheck.cc
/// Attempt to retrieve and return the current inet status from status
/// file.  On success the fields m_last_status and m_last_check will
/// be updated.  If the status file cannot be read, m_last_status will
/// be returned.  Note that the file might not exist after a reboot,
/// and will not be updated during certain hours--see crontab for the
/// update schedule.
///
/// * Will NOT throw
///
Attempt to retrieve and return the current inet status from status
file.  On success the fields m_last_status and m_last_check will
be updated.  If the status file cannot be read, m_last_status will
be returned.  Note that the file might not exist after a reboot,
and will not be updated during certain hours--see crontab for the
update schedule.

Will NOT throw
Attempt to retrieve and return the current inet status from status file . On success the fields m_last_status and m_last_check will be updated . If the status file cannot be read m_last_status will be returned . Note that the file might not exist after a reboot and will not be updated during certain hours -- see crontab for the update schedule . Will NOT throw
bool Inet_checker::get_current_status()
{
    if (not fs::exists(m_status_path)) {
        LOG_DEBUG(Lgr)
            << "Inet_checker: no such file: " << m_status_path;
        return m_last_status;
    }
    try {
        fs::ifstream sfile(m_status_path);
        int j=0;
        sfile >> j;
        m_last_status = (j==0);
        m_last_check = time(0);
    }
    catch (std::exception &e) {
        LOG_ERROR(Lgr) << "Inet_checker: error reading from "
                       << m_status_path << ": " << e.what();
    }
    return m_last_status;
}
bool Inet_checker :: get_current_status ( ) { if ( not fs :: exists ( m_status_path ) ) { LOG_DEBUG ( Lgr ) << " " << m_status_path ; return m_last_status ; } try { fs :: ifstream sfile ( m_status_path ) ; int j = 0 ; sfile >> j ; m_last_status = ( j == 0 ) ; m_last_check = time ( 0 ) ; } catch ( std :: exception & e ) { LOG_ERROR ( Lgr ) << " " << m_status_path << " " << e . what ( ) ; } return m_last_status ; }
Attempt to retrieve and return the current inet status from status
file.
Attempt to retrieve and return the current inet status from status file .
// m_file_writetime = last_write_time(m_config_path);